Articles Overview

Last edited: 8/21/2008

Articles have two different display types: list and detail.

There is one 'reserved' template that handles articles, ekk_articlepage.php.

Article List

Article lists do not have a reserved template and may be placed anywhere on a site.

Here is a simple article list getContent:

getContent(
       "article",
       "display:list",
       "show:<a href='__url__'><img src='__imageurl__' alt='__title__' /></a>",
       "show:<h5>__title__</h5>",
       "show:<div class='summary'>__preview limit='120'__ <a href='__url__'>read more</a></div>"
);

 Here is another example which will find only articles that are published as featured and from a certain series 'a deeper look'. It will order them by the date specified in the backend show the more recent ones first.

getContent(
       "article",
       "display:list",
       "find_series:a-deeper-look",
       "order:recent",
       "features",
       "show:<a href='__url__'><img src='__imageurl__' alt='__title__' /></a>",
       "show:<h5>__title__</h5>",
       "show:<div class='summary'>__preview limit='120'__ <a href='__url__'>read more</a></div>"
);

Article Detail

Article links automatically point to example.com/article/article-slug/. So an article titled "Women's Retreat" would always be found at example.com/article/womens-retreat/. This points at the file ekk_articlepage.php. Placing the following getContent in that page will display the proper content.

getContent(
     "article",
     "display:detail",
     "find:".$_GET['slug'],
     "show: <h3>__title__</h3>",
     "show:<p>__text__</p>"
);