XF 2.2 Target all forum_view template types

BassMan

Well-known member
Hi,

Is there any way to target all forum view template types with a single conditional?

Something like: <xf:if is="$template =='forum_view'">, but for all types (question, suggestion, ...).

I've tried with <xf:if is="$template =='forum_view*'"> and <xf:if is="$template =='forum_view_*'">, but that's not right.

Thank you.
 
Closest thing we have is the contains templater function:

Code:
<xf:if is="contains($template, 'forum_view')">

Not sure it comes up but it could also match a template that's something_forum_view_something...

So what you may actually want to do to reduce false positives is:

Code:
<xf:if is="$template == 'forum_view' || contains($template, 'forum_view_type_')">

Or something like that depending on exactly what you want to target.
 
Top Bottom