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.png

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

Any help appreciated. Thank you.
 

mcatze

Well-known member
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.png
    Bildschirmfoto 2021-02-28 um 15.41.26.png
    105.6 KB · Views: 11
  • Bildschirmfoto 2021-02-28 um 15.42.09.png
    Bildschirmfoto 2021-02-28 um 15.42.09.png
    69.4 KB · Views: 11
Top