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

getSimpleCacheData availability in templates

Discussion in 'XenForo Development Discussions' started by viewfinder, Nov 8, 2013.

  1. viewfinder

    viewfinder Member

    Is XenForo_Application::getSimpleCacheData available from PAGE_CONTAINER only?

    If so, is there a similar approach to access cache data from templates (or template modifications), e.g. forum_list?
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    PHP isn't available via templates.
     
  3. viewfinder

    viewfinder Member

    What I meant to say is params written to the cache (by a cron job say) is accessible in PAGE_CONTAINER, e.g. via {$someParam}. But the same {$someParam} is not working outside of the PAGE_CONTAINER template, e.g. in forum_list.

    Maybe I am missing something, but I couldn't get it to work.
     
  4. xf_phantom

    xf_phantom Well-Known Member

    Code:
    {$xenCache.cacheKey}
    should work:)
     
    cclaerhout likes this.
  5. viewfinder

    viewfinder Member

    Thank you xf_phantom! (y)
     

Share This Page