O'Reilly logo

Joomla! 1.5 JavaScript jQuery by Jose Argudo Blanco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working on our component's frontpage

Now that we have worked a bit on our admin zone, it's time for us to work on the frontpage of our component, just to make it look better. At the moment, our component only shows a list of news. If you take a look at the components/com_tinynews/views/tinynews/tmpl/default.php file, you will see our previous code:

defined('_JEXEC') or die('Restricted access');
            frontpage, Joomla! componentworking onforeach($this->news as $new){
            echo "<p><b>".$new->title."</b></p><br/><br/>";
            echo "<p>".$new->text."</p><br/><br/>";
            }
        

We are going to change this code a bit, as follows:

defined('_JEXEC') or die('Restricted access'); foreach($this->news as $new){ ?> <div class="news_box"> <h1><?php echo $new->title; ?></h1> <p><?php ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required