Hi everyone,
I’m making a custom template view for the “event list” block.
I unsuccessfully spent many hours figuring out how to retrieve the topic name of the events.
Thanks for your help, it is always strongly appreciated !
Hi everyone,
I’m making a custom template view for the “event list” block.
I unsuccessfully spent many hours figuring out how to retrieve the topic name of the events.
Thanks for your help, it is always strongly appreciated !
I think you have to get to this object and then call this method:
https://documentation.concretecms.org/api/9.1.1/Concrete/Core/Entity/Calendar/CalendarEventVersion.html#method_getCategories
I finally made it work with this code
$topics = $event->getAttribute('event_topics');
foreach ((object) $topics as $topic) {
$topicID=$topic->getTreeNodeID();
$topicName=preg_replace('/\s+/','',strtolower($topic->getTreeNodeName()));
echo $topicID.': '.$topicName;
}