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

 

Designing an articlesperson.php template page for Easy Magazine

The articlesperson.php is the page which lists all articles writed by a Writer or by an Editor.
Usually User access this page from the page people.php withch lists all writers and editor of the magazine.
It is very useful for reader if you put in the top of the page the name of the writer followed by the list of all his articles. For each article it is possible to see: the title, the author, the link to the related comments page and the subject.
The subject can contain images.

A list of articles withch belong to an user on Easy Magazine

Accessible data:

  • $this->person:
  • the person selected (User)
  • $this->articles:
  • the articles writed by the selected person (array Article(s))
  • $this->numbers:
  • array with the last 10 numbers published (array Number(s))
  • $this->number:
  • the last number published (Number)
  • $this->categories:
  • array containing all categories of the magazine (array Category)
  • $this->pages:
  • array containing all pages published (array 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:

						

All articles by <?= $this->person->getName() ?>

<? foreach($this->articles as $article) : ?> <? $URL = URIMaker::article($article); ?> <? echo "

"; ?> <?= $article->getTitle() ?>

<?= $article->getCreatedFormatted() ?> by <?= $article->auhorsNamesConcatenation() ?> | <? $URL = URIMaker::comment($article); $commentsNumber = count($article->commentsPublished()); ?> <? echo " comments ($commentsNumber) "; ?>
<?= $article->getSummary() ?>
<? endforeach; ?>
<?= $this->paginator->renderFullNav(URIMaker::articlesperson($this->person)) ?>

 


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