Hi All,
Running into something which I think could be done a bit more efficiently on my part (and will save manual work later on) which I need some help with.
(Running on Zen 1.3.8 and can't seem to find an example of this on the forums)
I have an element on a clients site which needs to call the cPath which is active to display:
<?php $PIC=$_GET["cPath"];
if ($PIC=="140" or $PIC=="140_95") echo "<li class='current'>";
else echo "<li>"; // DEFAULT ?>
Rather than listing out each subcategory (ie 140_96, 140_100, etc.) IS it possible to somehow call subcategories BELOW 140 in the example above so anything in cPath 140 or subcategories below will see <li class='current'>?
Thinking or $PIC=="140_" or or $PIC=="140*" but naturally these won't work
Obviously hardcoding will work for now, but thinking if its grabbing it as a * or something it will spare us from updating whenever a new subcategory gets added.
Any thoughts or advice how to accomplish would be greatly appreciated - thanks everyone!




