Get RenderTag result from Rql

119 views
Skip to first unread message

Bernd

unread,
May 22, 2013, 5:25:25 AM5/22/13
to reddot-c...@googlegroups.com
Hi all,
 
i have a question. Is it possible to get the result from a Navigation area via RQL? I can't find anything in the documentation.
 
 
Thank's for help

Manuel Schnitger (OpenText)

unread,
May 23, 2013, 2:53:45 AM5/23/13
to reddot-c...@googlegroups.com
Nope. Rendertags and RQL are completely different from a tchnical point of view and cannot communicate with each other. But if you try to describe what you want to achive then there might be some guys around who might be able to help.

Best regards,
Manuel

Bernd

unread,
May 23, 2013, 11:28:13 AM5/23/13
to reddot-c...@googlegroups.com
Thank's for the quick answer!
 
I agree with you it's another technology. Hm... It's no problem to go another way. The Render-Tag would be a little bit smarter :-)
 
 
Best Regards

Bernd

unread,
May 29, 2013, 4:11:48 AM5/29/13
to reddot-c...@googlegroups.com
Hi all,
 
it's possible to get the result from a RenderTag via RQL!!!!
 
Insert in the template this code:
 
<reddot:cms>
  <if>
    <query valuea="Context:CurrentRenderMode" operator="!=" valueb="Int:2">
      <htmltext>
        <!--
          <bb_RDTag><%!! Navigation:OutputArea(BreadCrumb,Bool:True) !!%></bb_RDTag>
        -->
      </htmltext>
    </query>
  </if>
</reddot:cms>
 
In The RQL-Script can you use the SmartEdit-Preview. You get the HTML and can parse it. All other things are simple :-)
 
<PREVIEW projectguid="strProjectGuid" loginguid="strLoginGUID" url="/CMS/ioRD.asp" querystring="Action=Preview&amp;Pageguid=strPageID"/>
 
I think this is a perfekt way.
 
 
Best Regards
 
Bernd

Jian Huang

unread,
May 29, 2013, 5:55:04 PM5/29/13
to reddot-c...@googlegroups.com
Hi Bernd,

Ummm, not sure what you are trying to do, but the RQL in the above method is redundant

<%
 ' Intruduce the url you want to visit
 GotothisURL = "http://localhost/cms/ioRD.asp?Action=Preview&Pageguid=<%inf_guid%>

 ' Create the xml object
 Set GetConnection = CreateObject("Microsoft.XMLHTTP")
 ' Conect to specified URL
 GetConnection.Open "get", GotothisURL, False
 GetConnection.Send 

 ' ResponsePage is the response we will get when visiting GotothisURL
 ResponsePage = GetConnection.responseText

' We will write 
 Response.write (ResponsePage)

 Set GetConnection = Nothing
 %>

The RQL is basically doing the same thing, so why not cut out the middle man and extra processing?

Also, it is not a best practice to preexecute RQL within the templates.  From all the projects that have landed on supports desktop and the ones I have audited, project with prexecuting RQL tend to be associated the words: high maintenance, slow performance, difficult to migrate to version 10 or 11, frequent publication issues, and more.

Just want to mention it here, so you may not fall into the same pitfalls as the other no so successful projects.

Bernd

unread,
May 29, 2013, 7:10:38 PM5/29/13
to reddot-c...@googlegroups.com
Hi Jian,
 
I will explain what I mean, and I agree with you it's a worse to implement RQL into a template. My first question was is it possible to get the result of a Rendertag from RQL. The answer was no, it's not possible. But i hate if if anthing doesn't work :-)
 
And now i found a solution. The problem was: My client create today filenames with RQL inside the Masterpage :-(  they do this because they use a navigation path (Delivery Server has no structure,SEO and so on) so that's the fact today. And i think it's realy better to create the filname if the page was released by the workflow.
 
In this case is the main question how can i get the structure of the side without a rendertag? hm... I think it's cost a lot of resources and to much scripting. So the idea was can i use the rendertag? Yes i can!
 
In the template is only this code:
<reddot:cms>
  <if>
    <query valuea="Context:CurrentRenderMode" operator="!=" valueb="Int:2">
      <htmltext>
        <!--
          <bb_RDTag><%!! Navigation:OutputArea(BreadCrumb,Bool:True) !!%></bb_RDTag>
        -->
      </htmltext>
    </query>
  </if>
</reddot:cms>
 
not more and this cost no performance or other resources.
 
I let create the workflow a XML file and with this information can I get the page preview from outside with RQL. You are right i can also use the xmlhttp request with Ajax. But I have a lot of  RQL Classes which i use and my scripts working on V.10 and V:11 this is a must, because all customer migrate at this moment to Version 11.
 
I see a little mistake in the RQL above: I wrote strPageID :-( but correct is strPageGUID
 
I don't preexecute RQL inside templates :-) I know what i do and what happens with all these kind of Projects :-) you can trust me.
 
For your Information, i'm working with these products since 1998 and i belive i know what best practise is :-)
 
I thought it's a god idea to post this Information if someone has a similar Problem and it offers a lot of ideas with rendertags.
 
 
Best Regards and thank's for your answer. It's nice to talk with you.
 
 
Bernd

Jian Huang

unread,
May 30, 2013, 10:57:22 AM5/30/13
to reddot-c...@googlegroups.com
Hi Bernd,

Thank you for the additional information.  Yeah, I agree that you are right on the issue of yes we can get results of a rendertag back via RQL.  We thought what you meant is by direct RQL call to a specific renderarea.  The solution presented is having rendertag output in a page instance, then use page preview to get the result.

You are are right on the DS URL not being SEO friendly, but you can still have different part of the site published to different content groups (directory) in DS.  Ok, the URL will be ugly, containing something like http://hostname:port/cps/rde/xchg/myproject/pathtostylesheet.xsl/-/products/widget.htm, but it is best practice to have incoming traffic to go to a front end web server and fetch content (usually dynamic because DS is an app server) from DS as needed.  Static content (images, css, js) should be published to the web server.  it is always a good idea to off load unnecessary work from the app server to the web server.  Regarding that ugly URL, we setup a rewrite rule on the web server to replace the ugly portion and output http://hostname/products/widget.htm.

I am sure you did things in the particular way because that may be the best way for the project.  I am just basing my solution on all the information that is given in this post. 

Instead of using rendertag to output breadcrumb, I find it better to use the native breadcrumb placeholder.  It is faster and more reliable in many different project structured.

http://simplyreddot.blogspot.com/2012/03/breadcrumb-rendertag-vs-placeholder.html

The workflow, extra project variant, publication target, publication project variant, and external RQL process was something we also investigated a few years back for auto file naming.  We abandoned the idea because it is a lot of extra work to setup, adds complexity to the project, extra work to rebuild in different environment, and when exporting a project, there are all these many different dependencies one have to worry about.  Hence, we gave users the following plugin.  Just include a snippet of code (no preexecution required, so no ugly preexecution error screen is anything fails) inside the foundation template, during smartedit view or preview, it automatically use the headline and assign it as file name.

http://simplyreddot.blogspot.com/2012/02/auto-file-name.html

Of course, please feel free to modify it so it uses the breadcrumb + page headline.  Just be careful of the the size of the file name (less than 250 chars being SEO friendly?).  Because of that, we tend to assign publication packages for each major section of the site.

Best regards and nice talking to you.

Bernd

unread,
May 30, 2013, 12:08:51 PM5/30/13
to reddot-c...@googlegroups.com
Hi Jian,
 
I completly agree with you and I see we have the same thoughts. But the inline function breadcrumb and the plugin for automatic filename doesn't work in this case. The think is we have projects with non latin chars (zh,ru,jp) and we have a standardfield for a custom filname because the headline is also used on the page and not allways the best think for the name. You are right 250 characters are to long! This is also a reason why we have to truncate the name. I think we have a good solution for all these little thinks and the customer can fell free to change his marketing strategie about filenames whitout a lot of costs. This is also another think the sustainability of work. Fact is a lot of people like URL's similar to this example: /products/productgroup/productname and so on or similar. :-)
 
i read also the blog from simplyreddot :-) and i know these plugins. I wrote also a lot of plugins. Sometimes it isn't simply everyone wiches to fullfill, but it should be possible :-) cost and time is another theme for this :-)
 
It's not possible is no answer for me, because I think it's allways possible. :-)
 
 
Best regards, and have a nice day
Reply all
Reply to author
Forward
0 new messages