08/02/2014 at 6:20 pm
#299442
Participant
A bit of an update, I’ve got the following code working, which shows the categories that are assigned to the individual:
<?php
echo "<ul>";
foreach ( $entry->getCategory() as $category ) {
if ($category->parent == '6') echo "<li>". $category->name . "</li>";
}
echo "</ul>";
?>
Is there some way to get all of the children of a parent category? And then highlight the ones that are assigned to an individual?
Example (if the individual is assigned child categories 2 and 3 but not 1 and 4):
o Child 1
x Child 2
x Child 3
o Child 4
Basically, trying to show all the child categories and “check off” the ones that have been assigned.
-
This reply was modified 12 years ago by
David Rogers.
