Hi Brian,
this function might help you:
'*************************************************************************
'* GetCons
'*************************************************************************
function GetCons(sPageGuid)
'***************************
'* get session values
'***************************
sSessionKey = "<%inf_session%>"
sLoginGUID = "<%inf_login%>"
'***************************
'* initialize objects
'***************************
set RQLObject =
Server.CreateObject("RDCMSAsp.RdPageData")
RQLObject.XmlServerClassName = XmlServerClassName
const XmlServerClassName = "RDCMSServer.XmlServer"
const DhtmlClassName = "RDCMSAsp.RdPageData"
const XmlDocumentClassName = "RDCMSXmlDom.RDDocument"
set XmlDomCon =
Server.CreateObject("RDCMSAspObj.RdObject")
RQLStatement = "<IODATA loginguid=""" & sLoginGUID & """
sessionkey=""" & sSessionKey & """>"&_
"<PAGE guid=""" & sPageGuid & """>"&_
"<LINKSFROM action=""load"" />"&_
"</PAGE>"&_
"</IODATA>"
RQLRequest = RQLObject.ServerExecuteXml(RQLStatement, sError)
if sError>"" then Response.write "Load elements.Error:</BR></
BR>"+sError
Call XmlDomCon.LoadXML (RQLRequest)
set XmlDomConList = XmlDomCon.objectbyquery("//LINKSFROM")
redim aCons(XmlDomConList.objects.count,2)
for i = 1 to XmlDomConList.objects.count
aCons(i,0) = XmlDomConList.objects(i)("pageheadline")
aCons(i,1) = XmlDomConList.objects(i)("guid")
next
GetCons= aCons
end function
'**********
'**********
It shows you all connections/linkings of a page. If you'd like to
follow just the main link, then add the line aCons(i,2) =
XmlDomConList.objects(i)("mainlink") to the function. The value of the
attribute "mainlink" just contains a "1" when the page above the
current page contains the main link.
Please drop me a line, if the function doesn't work or doesn't match
your requirements.
Happy 4th Advent,
Manuel
On 15 Dez., 23:08, BrianH <[email protected]> wrote:
> I am needing to traverse my way up the tree until I get to a certain
> content class using RQL
>
> I thought I could just create a recursive while loop that gets the
> current page information and uses the parentGUID to move up the tree.
>
> RQLStatement = "<IODATA loginguid=""" + LoginGUID + """ sessionkey="""
> + SessionKey + """><PAGE action=""load"" guid=""" + parentGUID + """/
>
> ></IODATA>"
>
> This works fine until I encounter a link, then it breaks because it
> doesn't return a parentGUID.
> IS there a way to determine that I am on a link and not a page and if
> so how do I get that link's parent?
>
> thanks,
> Brian
--
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.