BassMan Well-known member Feb 28, 2021 #1 Hi, I'm banging my head with this one... I would like to use a conditional statement from this: How to use to show some content only if there is a Question thread type allowed? Any help appreciated. Thank you.
Hi, I'm banging my head with this one... I would like to use a conditional statement from this: 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 Feb 28, 2021 #2 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 48.8 KB · Views: 14 Bildschirmfoto 2021-02-28 um 15.42.09.webp 30.5 KB · Views: 14 Upvote 0 Downvote
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>
BassMan Well-known member Feb 28, 2021 #3 Thanks! Yes, just need to solve the issue because not always the Question thread type is on number 2. Upvote 0 Downvote
Thanks! Yes, just need to solve the issue because not always the Question thread type is on number 2.
BassMan Well-known member Feb 28, 2021 #4 Ok, the easiest way is to set the Question tab right behind the Discussion tab for every node. Then the number will always be the same. Upvote 0 Downvote
Ok, the easiest way is to set the Question tab right behind the Discussion tab for every node. Then the number will always be the same.
Lukas W. Well-known member Mar 1, 2021 #5 Code: <xf:if is="in_array('question', $forum.type_config.allowed_thread_types)"> Upvote 1 Downvote