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

Conditional: If Not in Forum

Discussion in 'XenForo Development Discussions' started by krew, Feb 7, 2015.

  1. krew

    krew Member

    Hello all,

    I've successfully implemented a Xenforo wrapper around my standard website, but need to put conditional statements in the XF header that:
    • will only show up if the page is outside the forum directory
    • will only show up if the page is inside the forum directory
    Forum is installed in /forums, any assistance would be appreciated!
     
  2. krew

    krew Member

    Looking at my previous post, it doesn't do a good job of describing my issue.

    I have created a Xenforo wrapper around my Wordpress installation -- you can see it here (the forum itself is in a closed beta, so it's not visible):

    http://lexusenthusiast.com

    I'm using the XF <head> on every page on my site, but need to be able to load scripts etc. depending on whether it's within the forum area or in the Wordpress area.

    I could solve it using PHP code and parsing the URL, but PHP doesn't work in the templates as far as I can see.

    Is there a way to turn the current URL into a variable in XF and then search it for "/forum"? Is there an easier, more elegant way?

    Thanks!
     

Share This Page