Jump to content

Code to show category list


Recommended Posts

something like this

 

 

<script type="text/javascript" src="{$js_dir}tools/treeManagement.js"></script>

<ul class="tree {if $isDhtml}dhtml{/if}">

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

Link to comment
Share on other sites

Hello, thank you for the message. You can also take a look at the Add-On store, there are many different Footer Add-Ons available and some might fit your needs. Check it out! Thank you for choosing PrestaShop!

 

I have tried some modules but are complete modules for footer, i already have my custom footer with cms and account link, now i need to add the categories. I know how to show it but static so every time i make a modify to the category i need also to modify the footer.

 

 

something like this

 

 

<script type="text/javascript" src="{$js_dir}tools/treeManagement.js"></script>

<ul class="tree {if $isDhtml}dhtml{/if}">

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

 

That code seem to works only sometimes, the first time it showed the category but when i have updated the page on the browser with F5 it doesn't work anymore. I don't undertand why...

Link to comment
Share on other sites

It show this error:

Notice: Undefined index: blockCategTree in /data/vhosts/xxxxxx.it/store/tools/smarty/compile/f70b560a2e6e8469904c99f60ef357aefeae39ca.file.footer.tpl.php on line 51
Notice: Trying to get property of non-object in /data/vhosts/xxxxxx.it/store/tools/smarty/compile/f70b560a2e6e8469904c99f60ef357aefeae39ca.file.footer.tpl.php on line 51

Edited by DARKF3D3 (see edit history)
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...