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

Conditional for if viewing homepage

Trombones13

Well-known member
#1
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. :)
 

Shadab

Well-known member
#4
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 -->
 

Trombones13

Well-known member
#5
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
 

Trombones13

Well-known member
#7
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
 

Umit

Active member
#8
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>