Echo TopicCategory of current topic

Permalink
In my page i have two topiclist blocks - one for the clickable list and the other for the "H1" tag (i dont find other solution).

This works fine - Now i want to get the parent of this topic (look at the file attach).
if ($topic instanceof \Concrete\Core\Tree\Node\Type\TopicCategory) {


"THE PROBLEM" - in the for-each loop - it print all of 3 category parents.

Someone have idea how to print only "CSS" in my JPEG example? mabye build in function - "getTopicCategory" or something like this - i dont find

1 Attachment

siton
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.