XF 1.4 Is there away to load css and js files on index.php or / page?

GazCBG

Member
Hi,

I was wondering if there away for me to include some css and js files, but only on the index.php or / page?
 
Edit the content templates responsible for those pages, e.g. forum_list and use <xen:require css or <xen:require js to call your CSS or JS as appropriate. In this case the CSS would need to be templates you create containing your CSS in the Admin CP.

Another route is:

Code:
<xen:container var="$head.myCode">Your code here</xen:container>

Again add something like that to the forum_list template and it will be added to the header only on the index page.
 
Back
Top Bottom