oslayer Posted October 7, 2012 Share Posted October 7, 2012 I have Presta 1.5.1 and block BlockPermanentLinks I need to add to the three existing link above, links to CMS page For example: SuperDelivery |Contact us|Site maps|Bookmarks Delivery - page CMS has the following attributes, which are visible when editing the pages Friendly URL = delivery , Meta Title:SuperDelivery Take a file blockpermanentlinks-header.tpl which has the following code: <ul id="header_links"> <li id="header_link_contact"><a href="{$link->getPageLink('contact', true)}" title="{l s='contact' mod='blockpermanentlinks'}">{l s='contact' mod='blockpermanentlinks'}</a></li> <li id="header_link_sitemap"><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockpermanentlinks'}">{l s='sitemap' mod='blockpermanentlinks'}</a></li> <li id="header_link_bookmark"> <script type="text/javascript">writeBookmarkLink('{$come_from}', '{$meta_title|addslashes|addslashes}', '{l s='bookmark' mod='blockpermanentlinks'}');</script> </li> </ul> and after <ul id="header_links"> paste the following code: <li><a href="{$link->getCMSLink('1','delivery')}" title="{$cms->meta_title}">{$cms->meta_title}</a></li> And like everything should work, but it was not there when viewing the code using firebug we have: <li><a href="/1-delivery" title=""></a></li> variant with the following code {l s='delivery' mod='blockpermanentlinks'} is not work have a result <li><a href="/1-delivery" title="delivery">delivery</a></li> But we need to get: <li><a href="/1-delivery" title="SuperDelivery">SuperDelivery</a></li> Please help to solve this problem Link to comment Share on other sites More sharing options...
AryanShail Posted April 23, 2013 Share Posted April 23, 2013 (edited) <li><a href="{$link->getPageLink('cms.php?id_cms=6')}"{if {$smarty.server.REQUEST_URI} == '/content/profile'} class="active"{/if}>{l s='Profile' mod='tmheaderlinks'}</a></li> Modify the ID and the page name Edited April 23, 2013 by AryanShail (see edit history) Link to comment Share on other sites More sharing options...
hubbobubbo Posted April 30, 2013 Share Posted April 30, 2013 We are trying to do exactly the same thing as oslayer. This should not be so hard I guess but we can not make it work. The link works fine using getCMSLink but I do not understand how to get the meta_title of the CMS page to show as the link text. Sorry AryanShail but I do not understand your answer above. I just want to add an About Us page. The page exist in the CMS and the link works (using getCMSLink) but no luck showing the page title. Link to comment Share on other sites More sharing options...
Alatriste Posted February 28, 2014 Share Posted February 28, 2014 Sorry for raising this post from the dead, but I'm having the same issue as hubbobubbo has. So I added a CMS page link to the permanent links in the very top right of my site. Which is what I wanted (at least this is done by now!), but now, I simply can't make the link appear with the correct name. The link is being shown with its "friendly URL" instead of its Meta title. This is the personalised code I'm using in the blockpermanentlinks-header.tpl: <li><a href="{$base_dir_ssl}cms.php?id_cms=4">{l s='quienes-somos' mod='blockpermanentlinks'}</a></li> Does anyone know how can I make the meta title appear ("Quiénes somos") instead of the plain friendly url (quienes-somos)? Any help appreciated... Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 just translate it? why you use quienes-somos instead of Quienes Somos? Link to comment Share on other sites More sharing options...
Alatriste Posted February 28, 2014 Share Posted February 28, 2014 just translate it? why you use quienes-somos instead of Quienes Somos? Thanks Vekia. I did not think about that... I thought I could only write this code with the friendly url. I changed it and now it is read correctly. 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