ExpressionEngine images/fonts missing from subtemplates (template in template group)

45 Views Asked by At

I have set up a site with ExpressionEngine, and put the fonts and images folder in the root of the site, and they work absolutely fine for pages that are template group home pages (with the house icon) but they suddenly dont work on pages that are added to the same template group as new templates...

the paths look like this in the html: href="fonts/Anybody.woff2" or url(img/header_stripes_light.svg)

where should I copy the fonts and images folders to make them also work in subtemplates? I couldn't find anything useful in their documentation about this issue.

1

There are 1 best solutions below

1
Jelle Dijkstra On

That's an easy one! make those url's absolute and you're fine. Do it like this: href="/fonts/Anybody.woff2" or url(/img/header_stripes_light.svg) Your paths are relative to the page now, so without the initial "/"