Apfelstrudel Posted February 24, 2023 Posted February 24, 2023 Hello, we have a condition in our post template to hide user reactions in special forums. We do this with following condition (i.e. forum id=10): {{if !in_array($comment->item()->container()->id, array(10)) && !\IPS\Member::loggedIn()->restrict_post}} {{if !( $comment->hidden() === 1 && ( $comment->canUnhide() || $comment->canDelete() ) )}} {{if \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_enabled}} {template="reputation" group="global" app="core" params="$comment"} {{endif}} {{endif}} {{endif}} Now we want to hide the reaction bar also for topics marked with a special tag. Is it possible to filter by tag within the post template? If yes, how can we do that? Thanks in advance for any help. Best regards
Apfelstrudel Posted February 27, 2023 Author Posted February 27, 2023 No idea how we could add the tag filter to the above condition? I would really appreciate if somebody could help me.
Daniel F Posted February 27, 2023 Posted February 27, 2023 {{if \in_array('dein-tag', $item->tags())}} Topic has the tag "dein-tag" {{endif}} Apfelstrudel 1
Recommended Posts