XF 2.2 Conditional statement with allowed_thread_types

BassMan

Well-known member
Hi,

I'm banging my head with this one...

I would like to use a conditional statement from this:

Screenshot 2021-02-28 at 13.18.09.webp

How to use to show some content only if there is a Question thread type allowed?

Any help appreciated. Thank you.
 
It seems a little bit difficult, but not impossible. This is the way I found it.

If you know the array values, you can do it shorter like:
HTML:
<xf:if is="$forum.type_config.allowed_thread_types.2">
    <i>Just Questions</i>
</xf:if>
 

Attachments

  • Bildschirmfoto 2021-02-28 um 15.41.26.webp
    Bildschirmfoto 2021-02-28 um 15.41.26.webp
    48.8 KB · Views: 14
  • Bildschirmfoto 2021-02-28 um 15.42.09.webp
    Bildschirmfoto 2021-02-28 um 15.42.09.webp
    30.5 KB · Views: 14
Back
Top Bottom