NAV_LIST_UL & article count

RT Whenever you need/want to display the number of articles of any site structure level next to the name of the category, the script does it.

This is the quick and dirty solution! (Simple tag solution: Article counter)
This is the original NAV_LIST_UL of flip-flop that was incorporated by OG and now extended by –> easily add the number of articles within a certain site structure level.

The script works exactly like NAV_LIST_UL. So, you can use it with the same prominent parameters, features as usual.


Example of the menu:
Company (4)
Products (37)
Staff (12)

On the other hand it needs its own quick'n-dirty replacement tag

You're able to edit the output of the source code to your needs:
(12) or [12] or -12 or what

Just edit

// Article Count Wrapper
$acw_before = " <span>(";
$acw_after = ")</span>";



Parent lift:


Inline PHP:

if(isset($GLOBALS['LEVEL_ID'][1])) {
   $level_id = $GLOBALS['LEVEL_ID'][1];
   echo '<div class="my_navi_with_the_number_of_articles_in_the_site_structure_level">';
   echo '{NLU_FF_AC_QD:,'.$level_id.',1,act_path,active}';
   echo '</div>';

For those who are interested why I chose this name:
- FF = flip-flop
- AC = article count
- QD = quick and dirty


<note> Limitations: There's one limitation only. The script only counts the number of articles which are in exactly the same site structure level that appears in the menu. There's no summation (unfolded) over all. Articles in sub-categories are ignored (in that way)! </note>

Example: Products (1 article)

  • Product_A (17 articles)
  • Product_B (3 articles)

Products (1)
Product_A (17)
Product_B (3)


  • Products (21) (know what i mean?)


english/phpwcms_replacer_rts/frontend_render/nav_list_ul-article-count.txt · Last modified: 2018/06/03 18:09 (external edit) Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0