skinnybloke Posted August 26, 2015 Share Posted August 26, 2015 Hi - I have previously used the code from this page to display a menu of links to CMS pages on all CMS pages. https://mypresta.eu/en/art/developer/highlight-viewed-page-in-information-block.html I am in the process of upgrading from v1.5.5 to v1.6.and the variable $smarty.get.id_cms appears to no longer exist {if isset($smarty.get.id_cms)} // first if condition {if $smarty.get.id_cms == $cms_page.id_cms} // second if condition class="selected" // our class="" definition {/if} // second if condition close tag {/if} // first if condition close tag Anyone know if this variable has been replaced by something else? Link to comment Share on other sites More sharing options...
skinnybloke Posted September 3, 2015 Author Share Posted September 3, 2015 My fault - nothing wrong with the variable - just got my code a bit mixed up - got it working by using {foreach from=CMS::getCMSPages(1,2,true) item=cmspages} <!-- 1 = id lang, 2 = id_cms_category - get from table ps_cms_category_lang --> <li{if isset($smarty.get.id_cms)}{if $smarty.get.id_cms == $cmspages.id_cms} class="active"{/if}{/if}> <a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a> </li> /foreach} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now