lekvarnik Posted November 17, 2011 Share Posted November 17, 2011 the smarty that aI tried : <div class="rte{if $content_only} content_only{/if}"> <h1>{$meta_title|escape:'htmlall':'UTF-8'}</h1> {$cms->content} </div> outputs: My awesome cms page title | My website name some content here... However, I don't need my website name to output. I would like to have: My awesome cms page title some content here... How can this be done using smarty or row php? Thanks for any advice. Link to comment Share on other sites More sharing options...
lekvarnik Posted November 17, 2011 Author Share Posted November 17, 2011 I noticed that the content I want to output is stored in ps_cms_lang table in meta_tile column in the prestashop database. I need to somehow pull out this information into my template. How could it be done? Thanks in advance. Link to comment Share on other sites More sharing options...
lekvarnik Posted November 17, 2011 Author Share Posted November 17, 2011 I have tried using replace in smarty like that: {$meta_title|replace:'stringiwanttoreplace':'newstring'} but it it is not working. Why? Is replace not allowed or what? Prestashop makes in certain ways no sense to me 2 Link to comment Share on other sites More sharing options...
lekvarnik Posted November 17, 2011 Author Share Posted November 17, 2011 Ok, I tak it back. the replace smarty function si working now . Anyway, i still do not understand the absence of the title in CMS pages. I mean in Drupal, Joomla, Wordpress etc. this is a required field, but in Prestashop you have this field presented like meta tag title or something like that. It is confusing and not very good programming approach. Link to comment Share on other sites More sharing options...
Jikdor Posted November 22, 2013 Share Posted November 22, 2013 Bumping this totpic becuse i need help with the exakt same thing. Just want to display the page title (like "Terms and conditions of use") in the cms.tpl If anyone know witch variable to use I would be thankful. Link to comment Share on other sites More sharing options...
Jikdor Posted November 22, 2013 Share Posted November 22, 2013 (edited) Trying stuff around.. {$page-title} and {$meta-title} will display a zero, why?? Stuff like {$title} will display nothing. {$page_name} will display "CMS" and not the title of the cms page... Edited November 22, 2013 by Jikdor (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 22, 2013 Share Posted November 22, 2013 meta title is stored in {$meta_title} variable what you exactly expect? im asking because cms page displays title you want Link to comment Share on other sites More sharing options...
studioneko Posted January 30, 2014 Share Posted January 30, 2014 you can display the current title of your cms pageIn the CMS page itself: {$cms->meta_title} In the CMS Archive page: {$cmspages.meta_title} 1 Link to comment Share on other sites More sharing options...
Recommended Posts