简体   繁体   English

子模板中缺少 ExpressionEngine 图像/字体(模板组中的模板)

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

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...我已经使用 ExpressionEngine 建立了一个站点,并将 fonts 和 images 文件夹放在站点的根目录中,它们对于模板组主页(带有房子图标)的页面工作得非常好,但是它们突然不能在那些页面上工作被添加到与新模板相同的模板组中...

the paths look like this in the html: href="fonts/Anybody.woff2" or url(img/header_stripes_light.svg) html 中的路径如下所示: href="fonts/Anybody.woff2" 或 url(img/header_stripes_light.svg)

where should I copy the fonts and images folders to make them also work in subtemplates?我应该在哪里复制 fonts 和图像文件夹以使它们也可以在子模板中使用? I couldn't find anything useful in their documentation about this issue.我在他们的文档中找不到有关此问题的任何有用信息。

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 "/" href="/fonts/Anybody.woff2" 或 url(/img/header_stripes_light,svg) 你的路径现在是相对于页面的,所以没有最初的“/”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM