Jump to content

How to add cms page link in PermanentLinks Block?


Recommended Posts

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 :blink:

Link to comment
Share on other sites

  • 6 months later...

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

  • 9 months later...

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...

post-752469-0-11880400-1393597396_thumb.jpg

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...