DPL Example 008
From FollowTheScore
back to list of examples
Category tree
This is a simple demonstration of what can be done. The DPL statement could be moved to a separate template in the way DPL Example 007 was designed.
If you need a general category tree you better use the separate extension which is available exactly for that purpose. But if you want individual design, hide certain categories etc. then the DPL based solution is more flexible.
{{#tree: {{DPL Example 008 sub|DPL Example 007 main cat}} }}
The above DPL command produces the following output:
{{#tree:
- Pages in category DPL Example 007 main cat
- DPL Example 007 main page 1
- DPL Example 007 main page 2
- Pages in category DPL Example 007 sub cat 1
- Pages in category DPL Example 007 sub cat 2
}}