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

XF 1.5 Add sidebar to page node with php callback

Discussion in 'Styling and Customization Questions' started by drsprite, Sep 29, 2016.

  1. drsprite

    drsprite New Member

    Hey there, I have a page node that has this for the template html

    Code:
    <xen:callback class="drsprite_home" method="getHtml"></xen:callback>
    
    I'm trying my best to get it to show a sidebar, but am coming up empty.

    So far I've tried xen:sidebar and using the [bd] Widget Framework to add to the _page_node.XX, but still nothing. These also fail on the 5 or so other page nodes with almost identical callbacks.

    So I'm thinking the PHP callback must be doing something here? Any thoughts?
     
  2. drsprite

    drsprite New Member

    Anyone have any idea? Does PHP callback prevent a sidebar from loading and/or how can I add a sidebar to a php callback page? (add a hook somewhere in the PHP?)
     
  3. drsprite

    drsprite New Member

    This can be closed. Coming from WordPress, I was thinking there was an all-in-one hook for the sidebar.

    I've added this to my page node, and I have a sidebar now. Now to figure out which ones to populate it with

    Code:
    <xen:sidebar>
       
        <div class="section">
            <div class="secondaryContent statsList" id="boardStats">
                <h3>{xen:phrase online_statistics}</h3>
                <div class="pairsJustified">
                    <dl class="memberCount"><dt>{xen:phrase members_online}:</dt>
                        <dd>{xen:number $onlineTotals.members}</dd></dl>
                    <dl class="guestCount"><dt>{xen:phrase guests_online}:</dt>
                        <dd>{xen:number $onlineTotals.guests}</dd></dl>
                    <dl class="guestCount"><dt>{xen:phrase robots_online}:</dt>
                        <dd>{xen:number $onlineTotals.robots}</dd></dl>
                    <dl class="visitorCount"><dt>{xen:phrase total_visitors}:</dt>
                        <dd>{xen:number $onlineTotals.total}</dd></dl>
                </div>
                <div class="footnote">{xen:phrase totals_may_include_hidden_visitors}</div>
            </div>
        </div>
       
    </xen:sidebar>
    
     

Share This Page