I am using a template system for a website which uses 1 .tpl.php file as the main design. - Rather than create several files I want to use code within the 1 file to determine which page loads what content.
I currently am using a simple line to load the content for a Category:
<?php if ($category_id == 2) { ?>CONTENT HERE<?php } ?>
This works for the index of that category (/cat-name-2/) but it does not work for sub pages (/cat-name-2/sub-page-1.htm)
Does anyone know of a way to set the category and to load all the subpages within that category?