Smarty code stopped working upon CMS update
Posted: Sun Nov 24, 2013 6:35 pm
Hi,
I was wondering if somebody could help me troubleshoot this? I know there were some smarty updates with the last CMS update, but I'm not sure how they affect the smarty code I wrote.
I wrote code that would pull content from child pages into my tabs. When I updated the CMS my tabs stopped working correctly. Two issues where happening, when I turned off a page, it was still showing up in the tabs. And the navigation from tab to tab stopped working as well. The code is below. It was working fine on CMS 1.11.4, but not 1.11.9.
Thank you for any advice. I have tabs on almost all of my pages, and need to correct this.
<div id="tabs">
<ul>
{assign var='count' value='1'}
{foreach from=$cgsimple->get_children('page-name', true, $children) item='child'}
{if $child}<li><a href="#tab-{$count++}">{$cgsimple->get_page_title($child.alias)}</a></li>{/if}
{/foreach}
</ul>
{assign var='count' value='1'}
{foreach from=$cgsimple->get_children('page-name', true, $children) item='child'}
{if $child}<div id="tab-{$count++}" style="font-size: 110%;clear:both;">{eval var=$cgsimple->get_page_content($child.alias)}</div>{/if}
{/foreach}
</div>
I was wondering if somebody could help me troubleshoot this? I know there were some smarty updates with the last CMS update, but I'm not sure how they affect the smarty code I wrote.
I wrote code that would pull content from child pages into my tabs. When I updated the CMS my tabs stopped working correctly. Two issues where happening, when I turned off a page, it was still showing up in the tabs. And the navigation from tab to tab stopped working as well. The code is below. It was working fine on CMS 1.11.4, but not 1.11.9.
Thank you for any advice. I have tabs on almost all of my pages, and need to correct this.
<div id="tabs">
<ul>
{assign var='count' value='1'}
{foreach from=$cgsimple->get_children('page-name', true, $children) item='child'}
{if $child}<li><a href="#tab-{$count++}">{$cgsimple->get_page_title($child.alias)}</a></li>{/if}
{/foreach}
</ul>
{assign var='count' value='1'}
{foreach from=$cgsimple->get_children('page-name', true, $children) item='child'}
{if $child}<div id="tab-{$count++}" style="font-size: 110%;clear:both;">{eval var=$cgsimple->get_page_content($child.alias)}</div>{/if}
{/foreach}
</div>