Build menu with 'category' and smarty

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 4, 2009   (RSS)

Hi all,

I want to create a menu using the CMSCuilder Category menu type and Smarty.

Was trying to do this for a while but without the result I am looking for. Is there somebody who has done this before.

In HTML it must look like :

<div class="newMenu">
<ul id="nav" class="dropdown">
<li><a href="./">ROOT ITEM 1</a> </li>
<li><a href="./" >ROOT ITEM 2</a>
<ul>
<li class="empty">SUB ITEM 2.1</li>
<li><a href="./">ITEM 2.1.1</a></li>
<li><a href="./">ITEM 2.1.2</a></li>
<li class="empty">>SUB ITEM 2.2</li>
<li><a href="./">ITEM 2.2.1</a></li>
</ul>
</li>
<li><a href="./" >ROOT ITEM 3</a>
<ul>
<li class="empty">SUB ITEM 3.1</li>
<li><a href="./">ITEM 3.1.1</a></li>
<li class="empty">>SUB ITEM 3.2</li>
<li><a href="./">ITEM 3.2.1</a></li>
<li><a href="./">ITEM 3.2.2</a></li>
</ul>
</li>
</ul>
</div>


I also created this structure in CMSBuilder but cannot create the smarty template code to do this.

Thanks for helping!

Kind regards,
Jerry

Re: [jvkranenburg] Build menu with 'category' and smarty

By Dave - August 3, 2009

Hi Jerry,

I'm not familiar with the smarty template system (I've seen it but don't use it), but I can tell you how to generate the SQL.

There's no method to add class="empty" to certain elements though. You'd need a checkbox or something to indicate that.

What are you trying to create? Like what would the actually menu items be?
Dave Edis - Senior Developer
interactivetools.com