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

Yet another sidebar question...

#1
I know sidebar questions get asked about a lot. But I have, what I think, is a new one.

I have a text ad in ad_sidebar_top. But, if I am not logged in, the ad appears above the signup button. Is there any way I can have the ad appear below the signup button, but above the user avatar if the user is logged in?
 

Jake Bunce

XenForo moderator
Staff member
#2
It already shows above the signup button in the default style.

Have you customized the PAGE_CONTAINER? In the default template this code places that ad template before the signup button:

Code:
				<!-- sidebar -->
				<aside>
					<div class="sidebar">
						<xen:hook name="page_container_sidebar">
						<xen:include template="ad_sidebar_top" />
						<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
						{xen:raw $sidebar}
						<xen:include template="ad_sidebar_bottom" />
						</xen:hook>
					</div>
				</aside>
edit - I misread your post. Well this is the relevant code. You can modify this code to your liking. This should do what you want:

Code:
				<!-- sidebar -->
				<aside>
					<div class="sidebar">
						<xen:hook name="page_container_sidebar">
						<xen:if is="{$visitor.user_id}"><xen:include template="ad_sidebar_top" /></xen:if>
						<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
						<xen:if is="!{$visitor.user_id}"><xen:include template="ad_sidebar_top" /></xen:if>
						{xen:raw $sidebar}
						<xen:include template="ad_sidebar_bottom" />
						</xen:hook>
					</div>
				</aside>
 
#3
But the problem is, the visitor panel is also the avatar panel. So I want it below the signup button, but above the avatar panel, and both of those pieces seem to be contained in the visitor panel.

Guess I just need to experiment with the visitor panel code. I'm nervous I'll screw something up though... but it can be reverted.