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

$Alert variable?

Discussion in 'XenForo Development Discussions' started by ScottLott, Sep 22, 2013.

  1. ScottLott

    ScottLott Member

    Hey Guys,
    I'm trying to customize the look of the alerts and conversation pop-ups.

    I found the account_alerts_popup template that is setup perfectly...but there's a problem.

    No matter what, the $alerts variables return false, including the other related variables like $alertsUnread and $alertsRead.

    How can I set things up so I have access to those variables outside their normal scope?
  2. Jeremy

    Jeremy Well-Known Member

    What scope do you need them in?
  3. ScottLott

    ScottLott Member

    I'm trying to use them in the navigation_visitor_tab template, so giving that template access would be enough.
  4. Jeremy

    Jeremy Well-Known Member

    Use the <xen:container /> syntax. It'll make it available in the container.
    ScottLott likes this.
  5. ScottLott

    ScottLott Member

    Thanks for pointing me in the right direction!

    It still isn't working, though. I found instructions for the xen:container syntax on this page:

    But pasting the following code in the navigation_visitor_tab template returns null:

    <xen:container var="$userAlert">{$alertsRead}</xen:container>
    {xen:helper dump, $userAlert}

    Declaring the variable using <xen:set> doesn't help. Also, the other variables won't pass including $alert and $alertsUnread.
    Last edited: Sep 22, 2013

Share This Page