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

 

Designing an article.php template file for Easy Magazine

The article.php is usually opened when the user clicks the title of an article.
In this page the user has access to the whole article text and images.
Basically, what a magazine shows in this page, is the title of the article, the summary and the text. Text and summary can include images, links, and everything is possible to include in a web page.
Sometimes is nice to put ad the bottom of the title: the date of creation, the name of the authors and a link to the comments page.

Article page published using Easy Magazine

Accessible data:

  • $this->article:
  • the article that has to be showed in the page (Article)
  • $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->number:
  • the number containing the article (Number)
  • $this->pages:
  • array containing all pages published (array Page(s))
  • $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:

						

<?= $this->article->getTitle() ?>

<?= $this->article->getCreatedFormatted() ?> by <? echo $this->article->auhorsNamesConcatenation(); ?>
<?= $this->article->getBody() ?>
<? $URL = URIMaker::comment($this->article); $comm_number = count($this->article->commentsPublished()); ?>

<? echo " comments ($comm_number) "; ?>


 


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