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

XF 1.2 Adding Javascript to One Page

Discussion in 'XenForo Questions and Support' started by Robbie Poe, Jun 29, 2013.

  1. Robbie Poe

    Robbie Poe New Member

    I'm really looking forward to implementing this "Add To Home Screen" javascript from http://cubiq.org/add-to-home-screen, but I'm only wanting it to activate when users are on the /forums/ page. When I put the the .js and .css files within page_container_js_head, obviously it shows up on every page in my forum.

    Is there a way to have it only show up on /forums/ ?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have you tried adding it to the forum_list template?
  3. Robbie Poe

    Robbie Poe New Member

    Perfect! Thanks so much, Brogan.
  4. jayramfootball

    jayramfootball Active Member

    How do you add javascript to a standard page you create as opposed to the forum list - i only want the javascript on one page as opposed to all pages, so hoping I dont have to add it to the page container template...
  5. Brogan

    Brogan XenForo Moderator Staff Member

    You can add your code directly to the template using <script> tags.
    jayramfootball likes this.

Share This Page