Conditional for if viewing homepage

Trombones13

Well-known member
I'd like to have a block on my sidebar only show on the homepage--right now it's showing on other sidebars such as the Conversations page. How can I do this with a xen:if conditional? Thanks in advance. :)
 
Make sure you put it inside the <xen:sidebar> ... </xen:sidebar> tags in "forum_list" template.
No conditionals needed.
Ah; OK. :) So, what if I wanted to put one somewhere that wasn't at the bottom of all the blocks, such as in the discussion happening here?
 
Only positions #1 (above staff online), #3 (above statistics) and #4 (below statistics) are possible if you are placing your content via the "forum_list" template. The text you would look out for, in that template, is:

#1 - Above <xen:include template="sidebar_online_users" />
#3 - Above <!-- block: forum_stats -->
#4 - Below <!-- block: forum_stats -->
 
Only positions #1 (above staff online), #3 (above statistics) and #4 (below statistics) are possible if you are placing your content via the "forum_list" template. The text you would look out for, in that template, is:

#1 - Above <xen:include template="sidebar_online_users" />
#3 - Above <!-- block: forum_stats -->
#4 - Below <!-- block: forum_stats -->
Awesome; thanks a lot! So, are these correct now?
1. Below the Visitor Panel (your name, messages, likes, and points):
Template: forum_list
Add above: <xen:include template="sidebar_online_users" />

2. Below "Staff Online Now:"
Template: sidebar_online_users
Add above: <!-- block: sidebar_online_users -->

3. Below "Members Online Now:"
Template: forum_list
Add above: <!-- block: forum_stats -->

4. Below "Forum Statistics:"
Template: forum_list
Add below: <!-- end block: forum_stats -->

5. Below all other sidebar blocks (in this instance, TaigaChat):
Template: PAGE_CONTAINER
Add below: <!-- end block: forum_stats --> and any other <xen:include template lines
 
I just tested them, but I wanted to make sure I didn't mix any of them up, lol. Since they appear OK to you, I'll assume they are. Thanks a lot for your help! :D
 
Hi, how can i show ads for only homepage? (i want to put my ad code to footer template)
Code:
<xen:if is="{$XXhomeXX}">my ad code</div>
 
Top Bottom