not working
Permalink 1 user found helpful
I've followed the online instructions to add a custom theme, but when I view source, the links to the images and CSS are not picking up the themepath code.
Source:
Genreated source:
I also tried:
and got this generated:
Can anymore shed any light for me please?
For info, worked fine as it shows the edit header OK.
Source:
background-image: url(<?PHP $this->getThemePath()?>images/bg.jpg);
Genreated source:
background-image: url(images/bg.jpg);
I also tried:
background-image: url(<?$this->getThemePath()?>images/bg.jpg);
and got this generated:
background-image: url(<?$this->getThemePath()?>images/bg.jpg);
Can anymore shed any light for me please?
For info,
<?php Loader::element('header_required'); ?>
Hi Citytech,
No, the code is in the default.php file.
No, the code is in the default.php file.
The code should be like this.
You have forgotten to put the "echo" as well as trailing slashes.
Citytech
<?php echo $this->getThemePath()?>/
You have forgotten to put the "echo" as well as trailing slashes.
Citytech
FIXED! Brilliant. Thankyou.
I guess someone needs to update this page then!?
http://www.concrete5.org/documentation/how-tos/designers/make-a-the...
Thanks again
I guess someone needs to update this page then!?
http://www.concrete5.org/documentation/how-tos/designers/make-a-the...
Thanks again
I don't think that the code was wrong there. The code was
But in your code you have forgotten to put the "=" sign. That's why its not showing there. It is php short tag. Generally we can use both <?php ?>, <?= ?> tags for php.
By the way, please hit this as best answer if it helps you. It may help other community members to identify the correct answer.
Citytech
<?=$this->getThemePath()?>
But in your code you have forgotten to put the "=" sign. That's why its not showing there. It is php short tag. Generally we can use both <?php ?>, <?= ?> tags for php.
By the way, please hit this as best answer if it helps you. It may help other community members to identify the correct answer.
Citytech
I did use this code also, but it didn't work hence posting the problem. The echo part of the php code seems to have fixed it for me.
Then it might be short tag problem. I think it is off in your php.ini file. If the short tag is off, then it will not work for you. By the way, the best option is to use "echo". It is reliable as well as supported by all server.
Citytech
Citytech
That's fair enough. I can see in the php.ini that it is turned off. Thankyou for your help.
Citytech