Actually, it should be this :P <!IoRangePreExecute><%=pagename*%*><!/IoRangePreExecute>
2009/8/29 Eric Koleda <[email protected]> > > Hi Mike, > > In general it is bad practice to run RQL in templates. It can be a > solution to tricky problems, but there are often other solutions that > are more stable and less server intensive. What are you actually > trying to accomplish with your script? > > That said, I have spotted a typo in your code: > > <!IoRangePreExecute><=pagename><!/IoRangePreExecute> > > should be: > > <!IoRangePreExecute><%=pagename><!/IoRangePreExecute> > > Best, > - Eric > > On Aug 28, 3:59 pm, Mike Searles - AtlRugger <[email protected]> > wrote: > > We are using Reddot CMS 7.5.1.103 and am having trouble using RQL > > within an XML template - specifically assigning a variable and > > referencing that variable (pagename) within XML tags. > > The code I’m using (logging into the system, session key, etc.) all > > works perfectly in the ASP version of the template - but was wondering > > what/if anything needs to be changed with using that code within XML. > > Here's a snippet of the code I think is causing the problem: (with a > > slight modification made within the XML tag below for research > > purposes) > > > > <!--RDExecute=asp--> > > > > <!IoRangePreExecute> > > > > <% dim objData > > dim rqlRequest > > dim rqlResponse > > dim sErrors > > dim cms > > dim strLogin_Guid %> > > > > <!-- Function to create connection to CMS database --> > > <% function sendXML (rqlRequest) > > set objData = server.CreateObject("RDCMSASP.RdPageData") > > objData.XmlServerClassName="RDCMSServer.XmlServer" > > sendXML = objData.ServerExecuteXml(rqlRequest, sErrors) > > if sErrors <> "" then > > response.write "Errors occured: " & sErrors & chr(13) > > end if > > 'objData = NULL > > end function %> > > > > <!-- Pulls specific article information using the above page GUID to > > get appearance schedule information --> > > <% rqlRequest = "<IODATA > > loginguid=""D5B26D60EA1F45E4A593985C2418A4D3"" sessionkey=""< > > %nfoSessionKey%>""><PAGE guid=""<%nfoPageGUID%>""><LINKSFROM > > action=""load"" /></PAGE></IODATA>" > > rqlResponse = sendXML(rqlRequest) > > > > <!-- Generate a DOM Object to parse the response RQL statements --> > > Set xmlDoc = server.CreateObject("Msxml2.DOMDocument.4.0") > > > > <!-- Import content of response RQL to the DOM object --> > > xmlDoc.loadXML(rqlResponse) > > > > <!-- Creates an array of all connections within this specific article > > --> > > Set subRDxmlNodeList = xmlDoc.getElementsByTagName("LINK") > > > > <!-- Loop over list of all structural elements and retrieve the > > appropriate "articles list" GUID --> > > For i=0 To (subRDxmlNodeList.length - 1) > > connectedpage = > subRDxmlNodeList.item(i).getAttribute("ismainlink") > > pagename = > subRDxmlNodeList.item(i).getAttribute("pageheadline") > > <!/IoRangePreExecute> > > > > <connectedto> > > <!IoRangePreExecute><=pagename><!/IoRangePreExecute> > > </connectedto> > > > > <!IoRangePreExecute> > > Next > > > > <!-- Remove DOM object from memory --> > > set xmlDoc = nothing %> > > > > <!/IoRangePreExecute> > > > > Let me know if there are other parts of the code you need to see or > > have questions about. > > Any and all help would be greatly appreciated! > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
