XF 1.4 Make button on breadcrumbs bar show only on forum list page

sgr

Active member
I've added a button on the breadcrumbs bar (in the template: breadcrumb), and it shows up on all pages. I want it to show only on the forum list page. Do I have to use conditionals to achieve that or am I using the wrong template?
 
Use conditional:
Rich (BB code):
<xen:if is="{$contentTemplate} == 'forum_list'">
Your content here and it will show on forum_list only.
</xen:if>
 
Last edited:
  • Like
Reactions: sgr
@rafass,

Do you know what would be the content template for the innermost subforum?

For example,

This forum consists of the Closed Suggestions as the subforum. Closed Suggestions would be where I'd want to place something and not in its parent forum - XenForo suggestions. Is there a content template/conditional for that or will that have to be done manually for a particular forum?
 
You can use
Rich (BB code):
<xen:if is="{$forum.node_id} == x">
This content will show in forum x
</xen:if>
Just replace the x with the id of your forum.
The id is the last number in the URL:
gif.gif

...........................In this case 18 and 15 ↗

To identify the template:
3. How can I find out which template to edit?
Using your browser, view the page source and look for a line of code near the top of the page which begins
<div id="content" class="; the class is the name of the template. So for the main forum page, the line of code is: <div id="content" class="forum_list">, which makes the template forum_list.
Example:
gif2.gif
I recommend you to take a look at this resources: Conditional Statements and the FAQ of Brogan ;)
 
Last edited:
  • Like
Reactions: sgr
Awesome! :)

Yup. I did have a look at the Conditional Statements resource. I just wasn't sure how to find the template. Thanks for telling me.

Love the gif :cool:
 
Top Bottom