Homepage of www.easymagazine.net | Wem site map of www.easymagazine.net | Email the author of www.easymagazine.net

 

Designing an index.php template page for Easy Magazine

The index.php is the page opened by your browser at your first access to the magazine
It can contains a list of articles of the last number published.

Homepage of a magazine published using Easy Magazine

Accessible data:

  • $this->people:
  • contains a list of Users published (array User(s))
  • $this->number:
  • contains last number published (Number)
  • $this->numbers:
  • array with the last 10 numbers published (array Number(s))
  • $this->categories:
  • array containing all categories of the magazine (array Category(s))
  • $this->pages:
  • array containing all pages published (Page)
  • $this->metadescritpion:
  • string containing the metadescription of the page (String)
  • $this->metakeywords:
  • string containing the metadescription of the page (String)
  • $this->title:
  • string created to fill the title tag (String)

An example of code:

<h1>People</h1>
<? foreach($this->people as $user) { ?>
<div class="date"><h4><?= $user->getName() ?></h4></div>
<div class="entry">
<? if ($user->imageExists()) { ?>
<img src="<?= URIMaker::fromBasePath($user->imagePath()) ?>" width="60" align="left">
<? } ?>
<?= $user->getBody() ?>
</div>
<? } ?>

 


Copyright © 2009, 2010, 2011 Fabio Mattei, designed by zuudesign.sk