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

Lack of Interest Globally accessible sidebar data

Discussion in 'Closed Suggestions' started by RickM, Oct 10, 2010.

  1. RickM

    RickM Well-Known Member

    I (like quite a few others) have found out that if you move the sidebar into its own template, and include it on pages such as threadlist and threadview it breaks and shows errors. Basically because the data it needs to pull (for who's online & stats) is only provided for forum_list.

    Might I suggest making the sidebar data variables accessible globally. I can see this causing a ot of headaches as many sites so have a sidebar on all pages. I even tried doing some form of condition saying "if we're on the homepage, include the stats sidebar. Otherwise, continue" but I've found out the template system has no options for this (which is something else that is going to cause problems).

    So this is kind of a double feature suggestion:

    1 - Make sidebar-stats global


    2 - Allow conditional if statements to pick up the name of the current page so we can do something like:

    <xen:if condition="THIS_PAGE == 'forum_list'"> -- INCLUDE STUFF -- </xen:if>
    I can see this being HUGELY annoying to work with.

    I've had an open development discussion about it with Lawrence here if interested: Cant show stats on sidebar of all pages - so can we use an IF to set which pages its on?
  2. Vladislav Rastrusny

    Vladislav Rastrusny Active Member

    What do you mean under THIS_PAGE here? Current template? But templates can be xen:included into each other, so what template should be THIS_PAGE?
  3. RickM

    RickM Well-Known Member

    THIS_PAGE would be the current page a user is on. So say for example they were on forum home it would be something like 'home' and for viewing a thread 'threadview'. That way you can determin the type of page, and thus limit the stats to showing on the homepage only.

    I know its possible to just change whats in the <xen:sidebar> stuff....but you will be doing it for _every_single_page_ which is not exactly ideal. For now, I've disabled the stats completely as I cant use XenForo until I work this out.
  4. Kristopher

    Kristopher Member

    Good Call I agree!

Share This Page