ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Embedding js templates in header

August 28, 2011 7:19pm

Subscribe [2]
  • #1 / Aug 28, 2011 7:19pm

    Patrick Hvid

    62 posts

    Hi

    I have a few scripts that I load with every page in the header.
    Scripts are loaded from file system like any other script:

    <sçript type="text/javascript" src="{site_url}/jscript/cycle.js"></sçript>

    (edited the script to get it to show here)

    To get more control, and an organized view on all code I had a thought on placing the scripts in templates instead, and load these from the header, but I cannot really get my head around the syntax there..

    1 I this stupid? Will I increase page load etc?
    2 Is it doable, and if so - how would I approach?

    Searched the forum and internet and can’t really find anything on this..

    /p

  • #2 / Aug 28, 2011 7:35pm

    Patrick Hvid

    62 posts

    haha

    It was TO easy..
    Just load as any url with for example {path="x/y}

    /patrick

  • #3 / Aug 29, 2011 4:12am

    John Henry Donovan

    12339 posts

    Glad you figured it out 😊 feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases