How to stick <?=$this->getThemePath()?> within PHP IF Statement???
Permalink
What is the correct way to do echo an alternate CSS if C5 is in Edit Mode? Having to flip back and forth from PHP to HTML multiple times in a single IF statement is screwing me up.
Here is what I've got (and it's wrong):
<?php if ($c->isEditMode()) {
echo "<link href='$this->getThemePath()/stickyfootereditmode.css' rel='stylesheet' type='text/css' />";
}
else {
echo "<link href='<?=$this->getThemePath()?>/stickyfooter.css' rel="stylesheet" type="text/css" />";
}
?>
I don't know how to stick <?=$this->getThemePath()?>
within the <?php if ($c->isEditMode()) { echo
statement.
Here is what I've got (and it's wrong):
<?php if ($c->isEditMode()) {
echo "<link href='$this->getThemePath()/stickyfootereditmode.css' rel='stylesheet' type='text/css' />";
}
else {
echo "<link href='<?=$this->getThemePath()?>/stickyfooter.css' rel="stylesheet" type="text/css" />";
}
?>
I don't know how to stick <?=$this->getThemePath()?>
within the <?php if ($c->isEditMode()) { echo
statement.