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

XF 1.3 How do I identify public pages in templates?

Discussion in 'Styling and Customization Questions' started by Stuart Wright, Sep 14, 2014.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    I want to activate the AddThis sidebar widget in public pages only. (By 'sidebar' in this context, I mean the AddThis slide-out column of buttons which appears on the left or right edge of the screen).
    I added the AddThis JS in page_container_js_body but the widget is activating on all pages and I want to restrict it to public pages only.
    What xen conditional do I need to wrap around it to only display it on pages viewable by guests (member 0 on AVForums)?
    Thanks
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Stuart Wright

    Stuart Wright Well-Known Member

    That's not quite what I need, Paul. I need to base the condition on the permissions of the page, not the visitor.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I don't really understand.

    If the visitor doesn't have permission to view the page then...
     
  5. Stuart Wright

    Stuart Wright Well-Known Member

    I want to wrap the conditional round the script which displays the share buttons.
    If I use the above it will only be displayed to guests. I want it displayed to all members, but only on the pages which are publicly visible.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

Share This Page