21288 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 195 Views |
-
Static Publisher - javascript location

13 July 2012 at 2:25pm
I would like to if anyone has observed this. If i don't use cache the scripts are located in the header but if i enable the cache the scripts are located inside the body. I need them to be located on the header.
I have already set the Requirements::set_write_js_to_body(false);
Any help is greatly appreciated. Thanks.
-
Re: Static Publisher - javascript location

14 July 2012 at 12:23pm
hi
do you have script tags in the template? if so try <% require javascript(mysite/javascript/xyz.js) %>
lukas
-
Re: Static Publisher - javascript location

6 August 2012 at 2:15pm
hi lukas
thanks it works.
It's probably that i put the js files in the php instead in the template file.
-
Re: Static Publisher - javascript location

7 August 2012 at 7:50am
hi Peter Paul
If you put scripttags like <script>... directly in the templates, SS adds the rest of the scripts Requirements underneath the first scripttag. AFAIK it does not make a difference, if you add Requirements per php or per <% require ... %>.
lukas
| 195 Views | ||
|
Page:
1
|
Go to Top |


