Stylesheet not loading/path wrong

Permalink
For some reason my stylesheets stopped loading, and it seems to be a path issue though I'm not really sure why. I'm using what I thought was the standard call:

<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />


Which has worked consistently in the past.

Now it seems to be adding folders to the path that don't exist so it's not finding the stylesheet. When I look at the rendered code it says:

<link rel="stylesheet" media="screen" type="text/css" href="/index.php/tools/css/themes/adjusted yogurt/main.css" />


Did a recent update change where things are/should be stored? All my themes are in the basic themes folder at the installation level as they always have been. Any idea what I should be doing to fix this and going forward?

Here's the site I'm looking at:http://www.altaprojects.net/bob-jones-trail/...

AltaPlanning
View Replies:
McCormick replied on at Permalink Reply
McCormick
Easy fix: Looks like you need getThemePath. You can grab your stylesheet by using one of the following methods.


<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getThemePath(); ?>/main.css" />



<link rel="stylesheet" media="screen" type="text/css" href="<?php  echo DIR_REL ?>/path/to/themes/adjusted yogurt/main.css" />
McCormick replied on at Permalink Reply
McCormick
You could also move your stylesheet to your_root/css and then use DIR_REL to grab it from there:

<link rel="stylesheet" type="text/css" href="<?php echo DIR_REL?>/css/main.css" />
AltaPlanning replied on at Permalink Reply
AltaPlanning
We that did work for the most part (although I thought I had tried it and it didn't, weird) although the line that is supposed to be below my top navigation is actually somewhat above awkwardly. I can adjust that with CSS (I might just take it out) but I wonder what has changed.

Also wonder why the old code stopped working. I'm mostly curious because I use domain mapper with several themes that are actually their own sites so I might have to comb through several to see if this is happening elsewhere and update.

Any thoughts?

Thanks for your help.
McCormick replied on at Permalink Reply
McCormick
Ah, you should copy all images from your_root/concrete/images to your_root/images. You might have to create the latter folder, your_root/images. If that won't fix it, would you mind attaching a grab of it? I'm not aware of any (recent) change by Concrete that would cause your code to stop working. Here's one more way to grab your stylesheet, as long as you've moved or copied it to your_root/css/: In elements/header_required.php, where appropriate, include something like the following code.

$this->addHeaderItem($html->css('main.css'), 'CORE');
McCormick replied on at Permalink Reply
McCormick
That approach of course works with other types of scripts, too.

$this->addHeaderItem($html->javascript('jquery.js'), 'CORE');
AltaPlanning replied on at Permalink Reply
AltaPlanning
Hmm, I'm not really sure what this has to do with anything. I don't use images from either folder except where the Concrete installation itself does. I place theme related images in root/themes/whatevertheme/images or something like that most likely.
McCormick replied on at Permalink Reply
McCormick
I figured the line above your nav had something to do with your c5 CMS because I looked at your site and didn't see a line above your nav.