Question Regarding Paths being appended

Permalink
Hello all!

I wanted to post out to the community in an effort to try and pin down a recent issue I've been having in regards to pulling in custom fonts.

When I initially set up my site to try and import a custom font, I followed the guide here (http://www.concrete5.org/documentation/how-tos/designers/how-to-add-a-custom-font-face-to-your-theme/) and thankfully I was able to pull in my fonts.css file that I needed.

Unfortunately, just recently I went ahead and made some customizations to the theme I was using (Under Page Settings > Design). After I had saved those changes however, I noticed that my fonts we're no longer being referenced and I was getting 404 errors when trying to pull that fonts.css file.

Now in my header file, I was referencing the fonts.css file relatively which worked until I made the customizations to the theme. Now it seems as though it's changed the 'location/directory' of where these pages, or at least the header file is. The differences in what I've put into the header file, and what's being appended are below.

Before:
<link rel="stylesheet" type="text/css" href="<?php  echo $this->getStyleSheet('../fonts/raleway/fonts.css')?>" />


Now:
<link rel="stylesheet" type="text/css" href="/index.php/ccm/system/css/page/157/../fonts/raleway/fonts.css" />


In particular, I'm noticing that
/index.php/ccm/system/css/page/157/
is now being appended, which is obviously causing the reference to fail. My question is, is there any way that I can reset concrete5 so that I will stop appending this reference, or a way to set a direct path (which is /application/files/cache/css/fonts/raleway/fonts.css) in my header file?

As for other information, I do have Pretty URL's enabled all appropriately (as far as I can tell). And I've set the location of all my pages within their own page, rather than all being built from the index.php page.

If there's anything you guys might need from me, just feel free to let me know. Again, if there's any way that I can get this resolved, I'd greatly appreciate it!

1 Attachment

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi tjaeger,

Are you using the Elemental theme? If so, any modifications made to the theme will be overwritten when you update concrete5. To prevent those modifications from being overwritten, you can make a copy of the theme in the application folder.
https://www.concrete5.org/documentation/how-tos/designers/how-to-cop...

Do you have a link to your website?

Have you tried removing the link to fonts.css that you added?

Are you trying to use the Raleway font in the default Elemental preset?