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

how to define extra scripts (js) to include?

C

citricsquid

Guest
#1
Ahoy!

I'm using the Google font API (and some JS stuff) and I don't see a place in the style editor to define extra resources to include. The include needs to go in the header, like so:

Code:
<link href='http://fonts.googleapis.com/css?family=IM+Fell+English' rel='stylesheet' type='text/css' />
What's the proper / officially supported way to do this?
 

Forsaken

Well-known member
#2
Ahoy!

I'm using the Google font API (and some JS stuff) and I don't see a place in the style editor to define extra resources to include. The include needs to go in the header, like so:

Code:
<link href='http://fonts.googleapis.com/css?family=IM+Fell+English' rel='stylesheet' type='text/css' />
What's the proper / officially supported way to do this?
Edit the template.

EDIT: Sounded kinda basic...

You can also make styleproperties to control the values (I suggest using the WebFont API that supports various font providers).
 

Brogan

XenForo moderator
Staff member
#3
Additional js scripts can be placed in the PAGE_CONTAINER, page_container_js_head or page_container_js_body templates.
 

Brogan

XenForo moderator
Staff member
#6
If you use page_container_js_head then it will be included in the head section of PAGE_CONTAINER.

If you use page_container_js_body then it will be included in the body section of PAGE_CONTAINER, after the footer.

Using PAGE_CONTAINER you can use your own template or place it elsewhere in the page.

It depends on the js file to a large extent - some require to be placed in the head, some in the body.