Jump to content

CMS horizontal menu


Artx

Recommended Posts

Hello, as said in description, I need to Hook CMS blocks horizontaly and show respective submenus in CMS pages.

 

I allready have hooked CMS blocks from left column to a new hook, horizontally, at the top.

* Now I need to show all categorie and page links (expanded) in every CMS page, with respect to current CMS block.

* And I need a solution to show fist page in category, when clicked on category link, and CMS block link.

 

Much thanks for any help on this .

Link to comment
Share on other sites

I took a sample from sitemap page and put:

 

in CMSController.php "public function process()" function those lines:

self::$smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0));
self::$smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory(_USER_ID_LANG_, 1, 1, 1));

and in cms.tpl those lines:

<ul class="tree">
{if isset($categoriescmsTree.children)}
 {foreach from=$categoriescmsTree.children item=child name=sitemapCmsTree}
    {if (isset($child.children) && $child.children|@count > 0) || $child.cms|@count > 0}
      {include file="$tpl_dir./category-cms-tree-branch.tpl" node=$child}
    {/if}
 {/foreach}
{/if}
</ul>

...and allmoust got what I wanted, except, that it shows all of the categories, not the respective to selected cms block.

Anyone knows how to modify this ?

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