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

Getting the current URL

Discussion in 'XenForo Development Discussions' started by grantus, Feb 24, 2015.

  1. grantus

    grantus Active Member

    I'm trying to figure out what's the best way to do this:

    I created a page and in the template HTML, I'm calling a PHP file via an iframe. It works great but my PHP file's content takes up the full width of the forum. So for that, I would like to remove the sidebar just on this page.

    What would be the best way to do this? I was thinking of getting the current URL and putting an if/else statement in the PAGE_CONTAINER template. But is there a better way? If not, then how would I get the URL?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Which page do you want to remove the sidebar from?
    The only sidebar by default (on forum related pages) is the forum index, so it's not really clear what you're trying to do.
  3. grantus

    grantus Active Member

    Ah you know what, my fault! I forgot I have the Widget framework installed, that's what was set to show the sidebar on my custom page. I just checked and it's fine now.

Share This Page