Hi Nick,

Thank you for sharing this.  Just want to point out that the provided
code may not work well in version 10 because:

1.  RDExecuting write RQL may cause deadlock, especially in version
10.  Not mention a performance degradation factor.

2.  Replacement of islink=2 to islink=10 stops working since version
9.  It was a bug and hence fixed.

The more reliable method is to use the list to pull
inf_current_page_url.

Best regards,

-Jian

On Oct 25, 11:44 am, Nick Galotti <[email protected]> wrote:
> For a while now we have been having issues with our News Releases. We
> use keywords to display them in some areas and connect them directly
> to others. We didn't want to have the news pages pulled in by keyword
> to create a new page so we tried using the trick in this blog 
> post:http://www.reddotcmsblog.com/duplicate-content-publishing-seo-and-ope...
>
> That created the problem of the news releases that were directly
> connected to that list to not publish when using "Publish all
> following." So I came up with the following solution. In SmartEdit it
> will get all the keywords assigned the list and assign it to a
> standard field. Then in preexecuting blocks it will check each news
> release to see if it has a the same keywords, if it does then it
> assumes it is connected by keyword, otherwise it is assumed to be
> directly connected. It may not be perfect but it does the job.
>
> I am using two function getLinkGUID and getElementGUID that I have in
> another file, if you need these let me know. I am sharing this because
> I hope it might help some people out there.
>
> <!IoRangeRedDotMode>
> <%
> Dim keywordsList
> Dim pulledKeywords
>
> linkGUID = getLinkGUID("<%inf_PageGUID%>", "lst_news")
>
> xmlData = "<IODATA loginguid=""<%info_LoginGUID%>"" sessionkey=""<
> %info_SessionKey%>""><PROJECT sessioney=""<%info_SessionKey%>""><LINK
> guid=""" & linkGUID & """><KEYWORDS action=""load""/></LINK></
> PROJECT></IODATA>"
> xmlData = objIO.ServerExecuteXml (xmlData, sError)
> objXMLDOM.LoadXML(xmlData)
> set keywordsList = objXMLDOM.getElementsByTagName("KEYWORD")
> For i = 0 to (keywordsList.Length-1)
>     If pulledKeywords <> "" Then
>         pulledKeywords = pulledKeywords & ","
>     End If
>     pulledKeywords = pulledKeywords &
> keywordsList.Item(i).getAttribute("value")
> Next
>
> xmlData = "<IODATA loginguid=""<%info_LoginGUID%>"" sessionkey=""<
> %info_SessionKey%>""><ELEMENTS action=""save""><ELT guid=""" &
> getElementGUID("<%inf_PageGUID%>", "stf_keywords") & """ value=""" &
> pulledKeywords & """></ELT></ELEMENTS></IODATA>"
> xmlData = objIO.ServerExecuteXml (xmlData, sError)
>
> %>
> <!/IoRangeRedDotMode>
>
> <!IoRangePreExecute>
> <ul>
> <!IoRangeList>
> <%
> Dim pulled
> ' Determine if the page was pulled in by keyword or not
> pulled = 0
> pulledKeywords = Split("<%stf_keywords%>", ",")
> For Each pkeyword in pulledKeywords
>   If (pkeyword <> "") Then
>     newsKeywords = Split("<%info_keywords%>", ",")
>     found = 0
>     For Each keyword in newsKeywords
>         If pkeyword = keyword Then
>             found = 1
>         End If
>     Next
>     If found = 0 Then
>         pulled = 0
>         Exit For
>     End If
>     pulled = 1
>   End If
> Next
>
> ' If it was pulled in by keyword then use the referenced like,
> otherwise use the connected link
> If pulled=1 Then %>
> <li><a href="<%=Replace("<%lst_news%>","islink=2","islink=10")%>"><
> %hdl_title%></a></li>
> <% Else %>
> <li><a href="<%lst_news%>"><%hdl_title%></a></li>
> <% End If %>
>
> <!/IoRangeList>
> </ul>
> <!/IoRangePreExecute>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to