1

Topic: Display certain list menu

Hello folks,

I wanna know how to display a menu links of Products (only Products submenu).

-Homepage
    -Products
      -T-Shirt
      -Shoes
      -Pins

I just want to display the Product menu list on my sidebar. Any ideas? I've tried http://www.wolfcms.org/forum/topic754.html method but fail.

Thank you so much smile.

Thumbs up

2

Re: Display certain list menu

Hi rifie - welcome to Wolf!

rifie wrote:

I just want to display the Product menu list on my sidebar. Any ideas?

Yep. Stick this in your Layout's sidebar area:

<ul id="nav_sub">
<?php foreach ($this->find('products')->children() as $child): ?>
    <li><?php echo $child->link($child->title, (url_start_with($child->url) ? ' class="current"': null)); ?></li>
<?php endforeach; ?>
</ul>

That should do it for you. You might want to change the "id" of the UL list to something of your own choosing.

This is the "Simple in Sidebar" recipe from the Navigational Cookbook in the wiki, by the way. (Just inserting the "find" in line 2 so that it always points to your product listing.) It's a very useful part of Wolf's documentation.

Hope that helps! And do show us your site when it's ready. smile

Re: Display certain list menu

I am trying to only display a certain number of characters from dbase field otherwise it is way to long.

For example I have a description that is 500 characters and only want to diplsy the fisrt 30.

Thumbs up

4

Re: Display certain list menu

Stifenflaming wrote:

I am trying to only display a certain number of characters from dbase field otherwise it is way to long.

For example I have a description that is 500 characters and only want to diplsy the fisrt 30.

This plugin intended for the task.