<xen:if is="{$user.customFields.content_sidebar}">
...content appears here...
</xen:if>
I'm trying to do it without using "display:none" - I can't have hidden divs in this case. I'm after more of a "if this condition is true, show this html code in a template, else, show this other code" type of set up, without hidden divs. It looks like that might not be possible, as I read through that tutorial and couldn't find a way to do exactly what I'm asking. The media queries look like they would only work with "display:none", unless I misunderstood. If it's not possible, that's fine I'll change course. But if it is and I'm just misreading, please do let me know. My brain is a little mushy today.You can use a media query for CSS: Responsive Design
Sort of figured that would be the case, as I'm sure I would have come across the conditional by now with all the searching I was doing. Thanks Brogan.Unfortunately there isn't a conditional statement for browser width.
If you can't/don't want to use display:none then you will need to use something like JavaScript.
That's much easier than what I was doing. Thanks again Brogan... really loving this software for so many reasons (like being able to do a CMD+S or CMD+Z in the template editor, sooooo cool). Little things like that are a big deal.Use the template name.
How can I show content on a specific page?
<xen:if is="{$contentTemplate} == 'xyz'">
This content will show on the xyz template
</xen:if>
To find out the name of the template: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112
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.
We use essential cookies to make this site work, and optional cookies to enhance your experience.