Jump to content

Copying tmheaderlinks links code to blog page. Is it possible to do?


Recommended Posts

Is it possible to copy the tmheaderlinks menu code from the Prestashop portion of my website to the blog portion, which is WordPress based?

 

My site structure is set up as follows:

 

Main URL: www.mysite.com

Blog: www.mysite.com/blog

 

I took the basic template from Prestashop and used that as the base of my blog, which again, I created within WordPress.

 

For example, here is my tmheaderlinks code on the Prestashop side:

 

<ul id="tmheaderlinks">
    <li><a href="{$link->getPageLink('index')}"{if $page_name == 'index'} class="active"{/if}>{l s='home' mod='tmheaderlinks'}</a></li>
    <li><a href="{$link->getPageLink('prices-drop')}"{if $page_name == 'prices-drop'} class="active"{/if}>{l s='specials' mod='tmheaderlinks'}</a></li>
    <li><a href="{$link->getPageLink('contact', true)}" {if $page_name == 'contact'} class="active"{/if}>{l s='contact us' mod='tmheaderlinks'}</a></li>
    <li><a href="{$link->getPageLink('blog/index')}"{if $page_name == 'blog'} class="active"{/if}>{l s='blog' mod='tmheaderlinks'}</a></li>
</ul>

 

I tried copying that code to the header.php file of my blog, but all I get in the blog now is code instead of the menu.

 

Ultimately, I'd like to change the tmheaderlinks.tpl file, and then have it reflected on both the Prestashop, as well as the blog page.

 

Is what I'm trying to do possible?

 

Thank you.

Edited by rgwhitaker (see edit history)
Link to comment
Share on other sites

Hi,

 

you're putitng together two different languages, so this won't work. WOrdpress doesn't know how to process TPL..You can only insert Html/php code. So, what you need to do is the following - rewrite the html/tpl code into html/php code and then you can insert it into WP.

Link to comment
Share on other sites

×
×
  • Create New...