Link to files theme

Permalink 1 user found helpful
Hello.
I am building a theme and the C5 doesn't detect any file.
I think I am doing it correctly. Here is my code:
<link href="<?=$this->getThemePath()?>main.css" rel="stylesheet" type="text/css" />
   <link href="<?=$this->getThemePath()?>typography.css" rel="stylesheet" type="text/css" />

And after:
<div class="footer">
<img src="<?=$this->getThemePath()?>/images/chrome.png" alt="Google Chrome" width="20" height="20" align="absmiddle" />
</div>

Thank you for your help.
Martí

marticps
 
Steevb replied on at Permalink Reply
Steevb
Hi,

Don't know exactly what C5 cant find?

But you need the forward slash for your style sheets: '/'

<?=$this->getThemePath()?>/
marticps replied on at Permalink Reply
marticps
I have tried it before, it doesn't works.

Thank you,
Martí
marticps replied on at Permalink Reply
marticps
Ok I've found a solution to the css problem. I post here:
<style type="text/css" media="screen">@import "<?php echo $this->getStyleSheet('main.css')?>";</style>


But I'm still having the issue with the image.

Thank You,
Martí
Steevb replied on at Permalink Reply
Steevb
What's wrong?

Have you got padding in the footer or other styles to allow for size of image?
marticps replied on at Permalink Reply
marticps
I think that the path to the image it's wrong, but I don't know why.

In the code I put:
<img src="<?=$this->getThemePath()?>/images/chrome.png" (etc..)>


But when I go to the explorer I cannot see the image (appears like when a link is broken). I right-click on the image and I copy its URL:
http://myweb/%3C?=$this-%3EgetThemePath()?%3E/images/chrome.png...

Thanks,
Martí
marticps replied on at Permalink Best Answer Reply
marticps
Ok, I solved the problem.
Here's the code:
<img src="
<?php 
echo $this->getThemePath(); 
?>/img/chrome.png" alt="Google Chrome" width="20" height="20" align="absmiddle" />


Martí