None of the themes I download use <?=$this->getThemePath()?>/
Permalink
In the screencast, this little PHP snippet was used before every relative CSS, Javascript or image path and I added it to my template, too, as per the instructions.
But, in Vanilla Yogurt default theme or Greensalad theme, I don't see this <?=$this->getThemePath()?>/ snippet anywhere. How does one get around using this?
I'm seeing <?php echo DIR_REL?>/ ... is that basically the same thing?
But, in Vanilla Yogurt default theme or Greensalad theme, I don't see this <?=$this->getThemePath()?>/ snippet anywhere. How does one get around using this?
I'm seeing <?php echo DIR_REL?>/ ... is that basically the same thing?
Don't know if you found out by ourself yet, but is the short_tag form of
Its not considered good practice to leave short tags in PHP code you publish, as its a PITA if you ever have to move code to a server where they are not supported.
It's up to you to use them while developing, several methods and scripts exist, to convert them to the usual, long-tags before deploying your code.
Btw. The default theme at the moment — Greek Yogurt — uses in it's header.php to include several stylesheets ;-)
<?= $this->getThemePath(); ?>
<?php echo $this->getThemePath(); ?>
Its not considered good practice to leave short tags in PHP code you publish, as its a PITA if you ever have to move code to a server where they are not supported.
It's up to you to use them while developing, several methods and scripts exist, to convert them to the usual, long-tags before deploying your code.
Btw. The default theme at the moment — Greek Yogurt — uses
<?php echo $this->getThemePath(); ?>
We automatically convert short tags into <?php tags whenever anything is uploaded into our marketplace, btw. The core concrete5 code also uses short tags in github, but they are translated whenever we do an official release.
Yeah i know, as Ryan from the core-team explained this in one of his forum-posts, as a beta-tester for the 'Internationalization' Add-On got some errors during installation, but thanks for the fast reply.
what does...
mean?
I see that there is a "short tag" for the "echo" portion... but, if memory serves the thing that was confusing me was the "DIR_REL?" It seems to be Concrete5 specific since if I Google <?php echo DIR_REL?>/ all I see are C5 results.
<?php echo DIR_REL?>/
mean?
I see that there is a "short tag" for the "echo" portion... but, if memory serves the thing that was confusing me was the "DIR_REL?" It seems to be Concrete5 specific since if I Google <?php echo DIR_REL?>/ all I see are C5 results.
thanks, for the answer. now I know why my theme is not working on my liveserver. ;)
Is there anywhere a list of the equivalents in long-term for the other expressions often used in themes. For exmple I also don't get the header displayed.
Thanks a lot
sarah
Is there anywhere a list of the equivalents in long-term for the other expressions often used in themes. For exmple I also don't get the header displayed.
Thanks a lot
sarah
Hi poetze,
You can create a php.ini file with the short tag enabled. Just open a notepad, Put on that page & upload it to the root directory, most of the cases it should be public_html. And see it will work.
Citytech
You can create a php.ini file with the short tag enabled. Just open a notepad, Put
short_open_tag=On
Citytech
Thanks! It worked :)
It's very strange! I would certainly like to avoid sticking this bit of PHP before every relative path if possible!