I would like to know if You have a better solution than the one i attach here.
In a simple menu structure i would like to have a different display depending on the quantity of subitems. If there there is only one item, i would like to skip the submenu, and get the link directly in the "main" menu link.
Currently i made a model work like this:
<ul>
<li>[onshow_1;block=li;when [blk1.#] -+ 2]<a href="[blk1.url;block=a]">[blk1.category]</a>
</li>
<li>[onshow_1;block=li;default]<b>[blk2.category;block=b;headergrp=category]</b>
<ul><li><a href="[blk2.url;block=li]">[blk2.doc_title]</a></li></ul>
</li>
</ul>
|
Possibly there is a more elegant way to achieve the same ? What bothers me a little is that i need to merge two blocks blk1 + blk2 to get this work, when using "only" blk1 always the second block is shown, which is not correct.
But thanks anyway for this great library. it helps me a lot