NAVIGATION
This shows you the differences between two versions of the page.
|
english:technics:internal-function-call:category-top-down [2011/11/07 17:35] Knut Heermann (flip-flop) |
english:technics:internal-function-call:category-top-down [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 83: | Line 83: | ||
| Output ##$s##: **4,6,7,5,8** | Output ##$s##: **4,6,7,5,8** | ||
| + | \\ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | ===== Number of sub-levels ===== | ||
| + | |||
| + | Number of categories of the next level when available. | ||
| + | |||
| + | <code php> | ||
| + | echo count(getStructureChildData($GLOBALS['content']['cat_id'])); | ||
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | |||
| + | |||
| + | ==== Is there a sub-level? ==== | ||
| + | |||
| + | Simple Script to determine whether there is below the current level, a sub-level. | ||
| + | |||
| + | <code php> | ||
| + | // Sub-Level available? | ||
| + | |||
| + | if (!count(getStructureChildData($GLOBALS['content']['cat_id']))) | ||
| + | echo 'No Sub-level!'; | ||
| + | else | ||
| + | echo 'Sub-level available!'; | ||
| + | |||
| + | </code> | ||
| + | |||
| + | \\ | ||