R RobParker Well-known member Sep 8, 2017 #1 What's the correct way to link an external stylesheet? Should I hardcode it into the pagecontainer template or something else?
What's the correct way to link an external stylesheet? Should I hardcode it into the pagecontainer template or something else?
Arty Well-known member Sep 8, 2017 #2 You can use template modifications. Add it to helper_js_global in "head" macro (proper way) or append to google_analytics template (quick hack). Upvote 0 Downvote
You can use template modifications. Add it to helper_js_global in "head" macro (proper way) or append to google_analytics template (quick hack).
Chris D XenForo developer Staff member Sep 8, 2017 #3 There's a way to define code to appear in the header via the content templates too, so it doesn't require adding stuff globally, so it will only apply to the specific page: HTML: <xf:head option="myExternalStylesheet"><link rel="stylesheet" href="https://url.to.your/external.css" /></xf:head> Upvote 0 Downvote
There's a way to define code to appear in the header via the content templates too, so it doesn't require adding stuff globally, so it will only apply to the specific page: HTML: <xf:head option="myExternalStylesheet"><link rel="stylesheet" href="https://url.to.your/external.css" /></xf:head>
R RobParker Well-known member Sep 8, 2017 #4 If I want it globally then just adding it (via a template mod) to the page container is fine? Upvote 0 Downvote
Chris D XenForo developer Staff member Sep 8, 2017 #5 helper_js_global is probably ideal as per Arty's suggestion if it's a global thing (that's where we add the FontAwesome CSS) Upvote 0 Downvote
helper_js_global is probably ideal as per Arty's suggestion if it's a global thing (that's where we add the FontAwesome CSS)