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!
This is the original NAV_LIST_UL of flip-flop that was incorporated by OG and now has been extended with
--> easily add the number of articles within a certain site structure level.
https://github.com/slackero/phpwcms/com ... cc1dbfbebe
The script works exactly like NAV_LIST_UL [read more about basics]. You can use it with the same prominent parameters and 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:
Code: Select all
{NLU_FF_AC_QD:FA,5,,count_articles,active}
Code: Select all
{NLU_FF_AC_QD:FPA,4,2,act_path,active}
Code: Select all
{NLU_FF_AC_QD:FA,3,10,act_path,active,,,,,.......}
Code: Select all
[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:FA,'.$level_id.',1,act_path,active}';
echo '</div>';
}
[/PHP]
More information and Download:
↓
https://github.com/jensensen/NLU_FF_AC_QD