SimplePortal
Customization => Custom Coding => Topic started by: Burke Knight on July 04, 2013, 01:30:21 PM
-
I am making a news box block that uses css. It is using a custom php block.
I get the block to show, yet the news text does not. I know it is something simple I'm missing, but I just can't figure it out.
<?php
echo'
<div id="bkmnews" align="center">
<div id="bkmnew" align="center">
<div class="bkmnewtop"></div>
<div class="bkmnewmain">
<br />
<p align="center"><div id="random_news"><p>', $context['random_news_line'], '</p></div></p>
<br />
</div>
<div class="bkmnewbottom"></div>
</div>
</div>';
?>
The random news line should be showing, but it does not. I really need this to work, so if someone has an idea, please let me know.
Thank you.
-
You forgot to add global variables :)
global $context;
echo'
<div id="bkmnews" align="center">
<div id="bkmnew" align="center">
<div class="bkmnewtop"></div>
<div class="bkmnewmain">
<br />
<p align="center"><div id="random_news"><p>', $context['random_news_line'], '</p></div></p>
<br />
</div>
<div class="bkmnewbottom"></div>
</div>
</div>';
-
Like I said, something simple I missed...lol
Thanks. :)