Jump to content

[SOLVED] CMS meta_title's not displaying


Recommended Posts

Hi - I'm trying to use this code within cms.tpl to display a list of all my active CMS pages. 

{foreach from=CMS::getCMSPages(null,null,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}

The links are forming correctly but the meta_title's are not displaying - like this:

<li> <a href="http://www.domain.co.uk/content/1-deliveries-returns"></a></li>

I am using v1.5.5.0

 

Help???

Link to comment
Share on other sites

This is what I get:

array(4) {
["id_cms"]=>
string(1) "4"
["id_cms_category"]=>
string(1) "1"
["position"]=>
string(1) "0"
["active"]=>
string(1) "1"
}

array(4) {
["id_cms"]=>
string(2) "18"
["id_cms_category"]=>
string(1) "1"
["position"]=>
string(1) "1"
["active"]=>
string(1) "1"

array(4) {
["id_cms"]=>
string(2) "19"
["id_cms_category"]=>
string(1) "1"
["position"]=>
string(1) "2"
["active"]=>
string(1) "1"
}
Link to comment
Share on other sites

  • 2 years later...
{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,

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 small part of content to?

I have PS v1.6.

 

 

Thank you very much, Jiri.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...