Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
$category.hasChildren$ ???

 

 


ballen
User

Mar 19, 2009, 7:27 PM

Post #1 of 3 (2381 views)
Shortcut
$category.hasChildren$ ??? Can't Post

Hi,

I'm integrating a new menu that needs to have a class applied to <li>s with children (so I can style an arrow, etc.).

I'm not finding anything about how to do this with placeholders, etc.

Here's my current code:



Code
<ul class="dropdown-menu"> 
<!-- templateInsert : $categoryList$ -->
<!-- templatecell : categoryRow -->
<!-- templateIf: $category.isSelected$ != '1' -->
$category.listItemStart$<a href="/$category.filename$.html">$category.name$</a>$category.listItemEnd$
<!-- /templateIf -->
<!-- templateIf: $category.isSelected$ == '1' -->
$category.listItemStart$<a href="/$category.filename$.html">$category.name$</a>$category.listItemEnd$
<!-- /templateIf -->
<!-- /templatecell : categoryRow -->
</ul>



I need to know if the current <li> element has children so I can do something like:


Code
<!-- templateIf: $category.hasChildren$ == '1' --> 
class="parent"
<!-- /templateIf -->


Is there a way to do this?


Thanks!

-Bo


Donna
Staff / Moderator


Mar 23, 2009, 2:40 PM

Post #2 of 3 (2349 views)
Shortcut
Re: [ballen] $category.hasChildren$ ??? [In reply to] Can't Post

Hi there,

There isn't a placeholder like that by default -- you can see all of the placeholders available on a page by using this command:

http://www.interactivetools.com/docs/doc.cgi?/articlemanager2/templates/template_placeholderlist.html

That said, you could add in a custom category placeholder and fill it in by default? Basically, this would be like adding in a specific Article field, only adding it into the category table. You would need to update it manually when you update the category list.

Would something like that work for you?

Donna

--
support@interactivetools.com


ballen
User

Mar 25, 2009, 3:06 PM

Post #3 of 3 (2261 views)
Shortcut
Re: [Donna] $category.hasChildren$ ??? [In reply to] Can't Post

Hmm, thanks Donna, but for our site that would be too much work.

A suggestion for future AM2 updates perhaps? :)

Honestly, after NOT having arrows in the navigation to indicate pop-out subcategories, I'm finding that the arrows are unnecessary and distracting. :)

If the boss want's 'em added back in though, I'll probably have to go back to a PHP-driven navigation processor.