Page 1 of 1

Updating smarty for cms 2.1.1

Posted: Tue Mar 22, 2016 5:23 pm
by cpansewicz
Hi,

I have this bit of code in the previous CMS template, that I would like to update for the new CMS 2.1.1. I am not sure where to change the code. Basically the code says to look for a certain page and add content based on that page, otherwise use the navigation. The navigation is coming in correctly, but the logic with the page title isn't working. Thank you for any assistance.

{get_root_page_title}
<h4 id="leftsidebarnavheading" class="h2 hidden-xs">{cgsimple::get_page_title(cgsimple::get_root_alias())}</h4>
{if $root_page_title == "Online Forms"}
{global_content name='ad_olc'}
{else}
<div id="leftsidebarnav" role="navigation" aria-labelledby="leftsidebarnavheading">
<h4 class="h2 hidden-xs" id="leftsidebarnavheading">{$root_page_title}</h4>
{menu template='sub-nav' number_of_levels='5' start_level='2' collapse='1'}
</div>
{/if}

Re: Updating smarty for cms 2.1.1

Posted: Tue Mar 22, 2016 5:56 pm
by Jeff
{menu} has been replace with {Navigator}.

Re: Updating smarty for cms 2.1.1

Posted: Tue Mar 22, 2016 6:07 pm
by cpansewicz
Yes. Thanks. The {menu} I have is working fine. I am in the process of converting my existing menus to navigator.

What isn't working is:

{if $root_page_title == "Online Forms"}
{global_content name='ad_olc'}
{else}
...
{/if}

Re: Updating smarty for cms 2.1.1

Posted: Wed Mar 23, 2016 8:10 pm
by Jeff
Where is "$root_page_title" coming from?

I don't recognize "{get_root_page_title}" is it a custom UDT?