XF 1.2 Responsive template modifications

giorgino

Well-known member
Hi all :)

I'm making some changes to my template modifications for make more responsive my sites.

One of this is:

Find:
Code:
<xen:h1>{$xenOptions.boardTitle}</xen:h1>

Replace:
Code:
<div class="visibleResponsiveFull hiddenResponsiveWide hiddenResponsiveNarrow hiddenResponsiveMedium">
<xen:h1>{$xenOptions.boardTitle} con {xen:number $boardTotals.users} Membri Registrati</xen:h1>
</div>

but don't work. What's wrong?
 
How can I check if a specific variable is available in a template?
Add the following code to the template:
PHP:
{xen:helper dump, $variable_name}
Replace variable_name with the actual variable. If an array is returned then it is available, otherwise if NULL is returned then it is not available.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-248490

Thank you Brogan, so in my case, for use {xen:number $boardTotals.users}, I must add the following:
PHP:
{xen:helper dump, $boardTotals.users}

Right?
I test it and report back :)
 
uhmm... don't work

Code:
{xen:helper dump, $boardTotals.users}
<xen:if is="{$contentTemplate} == 'forum_list' ">
                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">                     
                            <!-- h1 title, description -->
                            <div class="titleBar visibleResponsiveFull visibleResponsiveWide hiddenResponsiveNarrow visibleResponsiveMedium">
                                {xen:raw $beforeH1}
                                <h1><xen:if
                                    is="{$h1}">{xen:raw $h1}<xen:elseif
                                    is="{$title}" />{xen:raw $title}<xen:else
                                    />{$xenOptions.boardTitle}</xen:if> con {xen:number $boardTotals.users} Membri Registrati</h1>
                             
                                <xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
                            </div>
                        </xen:if>
                        </xen:hook>
<xen:hook name="page_container_notices">
                        <xen:include template="notices" />                     
                        </xen:hook>
<xen:else />
<xen:hook name="page_container_notices">
                        <xen:include template="notices" />                     
                        </xen:hook>
                     
                        <xen:hook name="page_container_content_title_bar">
                        <xen:if is="!{$noH1}">                     
                            <!-- h1 title, description -->
                            <div class="titleBar">
                                {xen:raw $beforeH1}
                                <h1><xen:if
                                    is="{$h1}">{xen:raw $h1}<xen:elseif
                                    is="{$title}" />{xen:raw $title}<xen:else
                                    />{$xenOptions.boardTitle}</xen:if></h1>
                             
                                <xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
                            </div>
                        </xen:if>
                        </xen:hook>
    </xen:if>
 
That line will print out the value on the screen where its found in the HTML. If you see nothing print out, its most likely not available to you.
 
Top Bottom