Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I have started to use RocketCake but it is not behaving as I would expect. I have numerous situations where I need to insert a php variable into a text string. I managed to do this by inserting a container and setting the relevant styles etc. I then entered my text - no problem. I then inserted a php container with no div around the code, followed by more text. the code I get is <div id="container_798910f0"> <div id="container_798910f0_padding" > <div class="textstyle4"> <span class="textstyle3">This is a </span> <?PHP echo "test"; ?> <span class="textstyle3"> message.</span> </div> <div style="clear:both"></div> </div> </div> This works but because the php code is excluded from the span it does not have the correct formatting. The code that works correctly is <div id="container_798910f0"> <div id="container_798910f0_padding" > <div class="textstyle4"> <span class="textstyle3">This is a <?PHP echo "test"; ?> message.</span> </div> <div style="clear:both"></div> </div> </div> Is there any way that this can be achieved with RocketCake? |
||||
|
Never tried something like this, but maybe you could even just enter that "<?PHP" text directly on the page as text. Not sure if RocketCake will replace the > with & lt ;, though. |
||||
|
As you assumed RocketCake replaces the < and > with their entities as they are reserved characters so will not work. I can overcome this by setting the style in the php echo statement but it would have been easier if the code was included in the div. echo "<span style='font-size:18pt; font-family:Arial, Helvetica, sans-serif;'> $login </span>"; The reason for wanting to do this is that I run a couple of sites for annual horse shows and need to change things such as the year on the whole website. It is easier to make the changes using a php variable than go through the whole site and change each occurrence. |
||||
|
True, maybe a feature like this could be added in a future update. Will think about that. |
|