Assramm (cz) Posted November 8, 2016 Share Posted November 8, 2016 {foreach from=CMS::getCMSPages(1,1,true) item=cmspages} <li> <a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} Hello all, I want prepare small code into footer (something like News or small blog) ..I have from another post code up. Is working but.. Please, can you help me upgrade code up for multi-language store? (after switching between languages, names of articles are still in language id 1, links too) I tried to replace language id by ({$id_lang}) to fill this ID automaticly, but it is not working:/ (Im not PHP skilled) ... Seccond thing is, please is possible show under article names small part of content to (and use truncate)? I have PS v1.6. Thank you very much, Jiri. Link to comment Share on other sites More sharing options...
Assramm (cz) Posted November 13, 2016 Author Share Posted November 13, 2016 (edited) {foreach from=CMS::getCMSPages({$cookie->id_lang|intval},2,true) item=cmspages} <li> <h4><a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a></h4> <span><a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_description|strip_tags:'UTF-8'|truncate:50:'...'|escape:'htmlall':'UTF-8'}</a></span> <span><a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{l s=".. more" mod="" }</a></span> </li> {/foreach} Code up is correct (number "2" in first row is ID of CMS category!) "SOLVED" Edited November 16, 2016 by Assramm (cz) (see edit history) 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