Happy New Year 2021

A New Year is like a blank book, and the pen is in your hands. It is your chance to write a beautiful story for yourself. Happy New Year!

SignUp Now!
  • We've added extra Spam Protection. if you get problem with account registration / registration rejected. please contact us
Compatible XF 2.x versions
  1. 2.2
Adds a new template variable $xf.reply.templateParent which groups all thread_view* and forum_view* templates together.

XenForo 2.2 adds multiple variations to the thread_view and forum_view templates for the various new thread types:
  • thread_view_type_article
  • thread_view_type_poll
  • thread_view_type_question
  • thread_view_type_suggestion
  • forum_view_type_article
  • forum_view_type_question
  • forum_view_type_suggestion
So now when you want to target a template conditional to a thread view page (for example, in an advert), instead of previously doing the following:

HTML:
<xf:if is="$xf.reply.template == 'thread_view'">
<!-- do something -->
</xf:if>

... we must now do this:

HTML:
<xf:if is="in_array($xf.reply.template, [
'thread_view',
'thread_view_type_article',
'thread_view_type_poll',
'thread_view_type_question',
'thread_view_type_suggestion'
])">
<!-- do something -->
</xf:if>


An easier way

This addon adds a new template variable we can use to check if the template "parent" is thread_view or forum_view, so we can simply do the following instead to target all templates of that type:


HTML:
<xf:if is="$xf.reply.templateParent == 'thread_view'">
<!-- do something for any thread view pages -->
</xf:if>


... or:


HTML:
<xf:if is="$xf.reply.templateParent == 'forum_view'">
<!-- do something for any forum view pages -->
</xf:if>
Author
Admin
Downloads
1
Views
51
First release
Last update
Rating
4.00 star(s) 1 ratings

More resources from Admin

  • Recent Topics
    This resource will show a box with the latest topics/posts on board index.
  • Tutorials
    A full-featured Tutorials/Article system for your IPS Community.
  • Account Upgrade With Promo Code
    User can get discount on account upgrade by using promo code, will generates by addon
  • Reco
    Reco is a theme excellent for magazines, blog, digital freebies, mockups and others.
  • [SVG] Visitor Panel
    Visitor Panel plugin will add a user panel.
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock