{{indexmenu_n>310}} ====== 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: [[english/phpwcms_replacer_rts/frontend_render/article-count|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 [[english/navigation/nav_list_ul|NAV_LIST_UL]]**. So, you can use it with the same prominent [[english/navigation/nav_list_ul_parameters|parameters]], features as usual. ==== Example ==== **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 = " ("; $acw_after = ")"; \\ **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 '
'; echo '{NLU_FF_AC_QD:,'.$level_id.',1,act_path,active}'; echo '
'; } [/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 ==== Limitation ==== **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)! **Example:** Products (1 article) * Product_A (17 articles) * Product_B (3 articles) **Output:** \\ Products (1) \\ Product_A (17) \\ Product_B (3) \\ **YOU WON'T GET:** \\ * Products (21) //(know what i mean?)// \\ ---- ---- \\ ==== Version ==== {{indexmenu>english/phpwcms_replacer_rts/frontend_render/nav_list_ul-article-count|js#doku navbar msort nsort nocookie notoc}} \\