• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 How to exclude templates from loading

#1
I have a certain template where I do not want the header, navigation and a few other templates load.

How do I exclude these templates so that they won't load?
 

Tracy Perry

Well-known member
#3
You would probably would have better luck asking in the Styling area since that is more what I would consider this than a general support issue. Maybe someone like @Steve F or @Russ might be familiar with doing that (they make some fantastic styles and do custom work also) so they may have done it in the past.
 

Steve F

Well-known member
#4
You can create a 2nd style, child to your default so it picks up your main styling, and remove unwanted template calls from the PAGE_CONTAINER template. I'm assuming you are doing a Page Node, or certain forum possibly? If so just set option in the node options to override users style choice with the style you removed the template calls from.

Anything more than that would likely require some custom development.
 
#5
You can create a 2nd style, child to your default so it picks up your main styling, and remove unwanted template calls from the PAGE_CONTAINER template. I'm assuming you are doing a Page Node, or certain forum possibly? If so just set option in the node options to override users style choice with the style you removed the template calls from.

Anything more than that would likely require some custom development.
Thanks for the reply.

It's what I'm doing right now but it's created quite the complications for the thread listing.

Pretty weird that xenforo doesn't have a tag to exclude a template as this is very inefficient way of doing this.
 

Steve F

Well-known member
#6
Some more info on what pages/nodes or whatever you are trying to achieve this on might help direct you to an easier solution.
 
#7
Some more info on what pages/nodes or whatever you are trying to achieve this on might help direct you to an easier solution.
I'm using xenforo in a way it's not really supposed to be used.

I need threads to not have headers, navigation, footers etc.
But yeah I guess I have to just rework the whole thread_listing and include the page container stuff there.
 

Russ

Well-known member
#8
What you could do is edit page_container and basically wrap whatever content you don't want showing in something like:

Code:
<xen:if is="{$contentTemplate} != 'thread_view'">
default page_container code you don't want showing in thread_view
</xen:if>
 
#9
What you could do is edit page_container and basically wrap whatever content you don't want showing in something like:

Code:
<xen:if is="{$contentTemplate} != 'thread_view'">
default page_container code you don't want showing in thread_view
</xen:if>
Wow, you've saved a lot of hours of my time.
Thanks a lot.
 

Tracy Perry

Well-known member
#10
See, told ya' that one of the two of them would probably be able to figure it out.. they do some neat stuff with their styles... now, if they would just get Archon done (hint hint @Russ) I'll most likely grab a copy to turn it into a light version. Need something new to play with.
 
#11
See, told ya' that one of the two of them would probably be able to figure it out.. they do some neat stuff with their styles... now, if they would just get Archon done (hint hint @Russ) I'll most likely grab a copy to turn it into a light version. Need something new to play with.
Haha, thanks a lot for tagging them :)