Jump to content

Category menu - add blog link


Recommended Posts

Hello,

 

I´m wondering if anyone can help me out a little.

 

I´m setting up a template with a horizontal menu which is linked directly to the product categories.

 

Now I was adding a blog module (Prestablog) to the site and would love to add a link to it on the menu.

 

I´ve been trying to work with tmcategories.tpl but no luck. This is how it looks now:

 

<!-- TM Categories -->

<div id="tmcategories">

<ul id="cat">

{foreach from=$blockCategTree.children item=child name=blockCategTree}

{if $smarty.foreach.blockCategTree.last}

{include file="$branche__path" node=$child last='true'}

{else}

{include file="$branche__path" node=$child}

{/if}

{/foreach}

</ul>

 

</div>

<!-- /TM Categories -->

 

 

Shouldn't there be a simple solution to this? I noticed one topic where there was a similar issue but for some reason it doesn't work for me.

Do I maybe need to change other files than tmcategories.tpl?

 

I´m running on version 1.4.5.1

 

Thank you in advance :)

Link to comment
Share on other sites

  • 1 month later...

Hi!

 

So I tried, but it does not work

 

 

 

 

<!-- TM categories module -->

<div id="tmcategories">

<ul>

{foreach from=$blockCategTree.children item=child name=blockCategTree}

{if $smarty.foreach.blockCategTree.last}

{include file="$branche_tpl_path" node=$child last='true'}

{else}

{include file="$branche_tpl_path" node=$child}

{/if}

{/foreach}

<li>

<a title="TITLE HERE" href="ADRESS-HERE">

<span>Prestablog</span>

</a>

</li>

</ul>

</div>

<!-- /TM categories module -->

Link to comment
Share on other sites

  • 3 weeks later...

Dear Prestashop experts,

 

I'm also having the same problem with tmcategories.

 

Tried hardcoding the links between the <ul></ul> but no success. Even tried {literal} but no luck.

 

This is the code for tmcategories.tpl:

 

<!-- TM categories -->
<div id="tmcategories_wrap">
<div id="tmcategories">
<ul id="cat">
{foreach from=$blockCategTree.children item=child name=blockCategTree}
 {if $smarty.foreach.blockCategTree.last}
  {include file="$branche_tpl_path" node=$child last='true'}
 {else}
  {include file="$branche_tpl_path" node=$child}

 {/if}
{/foreach}
 </ul>
</div>
</div>
<!-- /TM categories -->

 

And this is the code for category-tree-branch.tpl:

 

<li {if $node.children|@count > 0}class="sub"{/if}>
<a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if}
title="{$node.desc|escape:html:'UTF-8'}">
{$node.name|escape:html:'UTF-8'}</a>
 {if $node.children|@count > 0}
 <ul class="subcat">
 {foreach from=$node.children item=child name=categoryTreeBranch}
  {if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}
{include file="$branche_tpl_path" node=$child last='true'}
  {else}
{include file="$branche_tpl_path" node=$child last='false'}
  {/if}
 {/foreach}
 </ul>
{/if}
</li>

 

Really appreciate your help for this :) - Thanks!

Link to comment
Share on other sites

  • 6 years later...

Hello , 
Hope that you are doing well , I'm looking for a solution of my problem . I would like to display blogs in my product page ... For exemple i have a blog catégorie named A  wich sould be displayed in all products pages of product category B . 
I'm using smart blog ..SO is there any way to do it ? 
Thanx

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