What Are Articles?
Articles are blog or news entries that can be displayed on CMS pages. Unlike pages, articles have a publication date, an author, and can be automatically published and expired on a schedule.
Key Features
- Publication scheduling — set a Publish from date and optionally a Publish until date for the article to appear and disappear automatically
-
Categories — the Category code field allows grouping articles (e.g.,
news,blog,tutorials) - Abstract — a short article description displayed on lists
- Image — article image URL for a thumbnail on the list
- Author — article author’s name
- Approval — an article requires approval before publication (Approved field)
- URL path — generated automatically from the title or set manually
- SEO meta — HTML title, description, and keywords
- Markdown — content supports GitHub Flavored Markdown, automatically detected
Displaying Articles on a Page
To display a list of articles on a CMS page, insert a tag in the page content:
<cms type="article" category_code="news" per_page="10">
<list>
<h2>{{ article.title }}</h2>
<p>{{ article.abstract }}</p>
<a href="{{ article.url }}">Read more</a>
</list>
<show>
<h1>{{ article.title }}</h1>
<div>{{ article.content }}</div>
</show>
</cms>
The <list> tag defines the article list template with pagination, and <show> defines the single article view.