NewBeZenner Question - recursive methods continued
I have a recursive method that renders the site navigation, called from standard_html_header: <!--#in "objectValues(['Folder', 'DTML Document'])"--> <!--#if "meta_type == 'Folder'"--> <tr><td> <!--#if expr="id <> 'REQUEST.pageid'"--> <!--#var FolderClosed--><a href="<!--#var absolute_url-->"><!--#var title_or_id--></a> <!--#else--> <!--#var FolderOpen--><!--#var title_or_id--></a> <!--#/if--> </td></tr> <!--#var navigation--> <!--#/if--> <!--#/in--> In the standard_html_header I declare a new variable: <!--#call REQUEST.set('pageid',id)--> I then compare <!--#if expr="id <> 'REQUEST.pageid'"--> to determine what Folder Image should be rendered and if a hyperlink should be created. I tried to simply display the pageid variable to determine it's value: <!--#var expr="_[pageid]"--> , but it produced an error This does not work. What todo? Roché
Roché Compaan wrote:
In the standard_html_header I declare a new variable: <!--#call REQUEST.set('pageid',id)-->
I then compare <!--#if expr="id <> 'REQUEST.pageid'"--> to determine what Folder Image should be rendered and if a hyperlink should be created. I tried to simply display the pageid variable to determine it's value: <!--#var expr="_[pageid]"--> , but it produced an error
You have quoting problems here. "id <> 'REQUEST.pageid'" compares the value of 'id' to the literal string 'REQUEST.pageid'. You want "id <> REQUEST.pageid" instead. If you want to see the value of pageid, use <!--#var pageid-->. What you wrote attempts to look up the object whose id is stored in pageid.
participants (2)
-
Evan Simpson -
Roché Compaan