NAVIGATION
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
NLU_FF_AC_QD
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>";
Usage:
{NLU_FF_AC_QD:F,5,,count_articles,active}
Parent lift:
{NLU_FF_AC_QD:FP,4,2,act_path,active}
Inline PHP:
[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>'; } [/PHP]
For those who are interested why I chose this name:
- NLU = NAV_LIST_UL
- 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)
Output:
Products (1)
Product_A (17)
Product_B (3)
YOU WON'T GET: