\Blog_Controller
Blog Controller
- Author: Michael Strong <github@michaelstrong.co.uk>
Synopsis
class Blog_Controller
extends Page_Controller
{
- // members
- private static array $allowed_actions = ;
- private static array $url_handlers = ;
- protected DataList $blogPosts;
- // methods
- public void index()
- public SS_HTTPResponse archive()
- public SS_HTTPResponse tag()
- public SS_HTTPResponse category()
- public string rss()
- public PaginatedList PaginatedList()
- public BlogTag|null getCurrentTag()
- public BlogCategory|null getCurrentCategory()
- public int|null getArchiveYear()
- public int|null getArchiveMonth()
- public int|null getArchiveDay()
- public Date getArchiveDate()
- public string getRSSLink()
Hierarchy
Extends
- Page_Controller
Members
private
- $allowed_actions
- $url_handlers
protected
- $blogPosts
—
DataList
The current Blog Post DataList query.
Methods
public
- PaginatedList() — Returns a list of paginated blog posts based on the blogPost dataList
- archive() — Renders an archive for a specificed date. This can be by year or year/month
- category() — Renders the blog posts for a given category
- getArchiveDate() — Returns the current archive date.
- getArchiveDay() — Fetches the archive day from the url
- getArchiveMonth() — Fetches the archive money from the url.
- getArchiveYear() — Fetches the archive year from the url
- getCurrentCategory() — Category Getter for use in templates.
- getCurrentTag() — Tag Getter for use in templates.
- getRSSLink() — Returns a link to the RSS feed.
- index()
- rss() — Displays an RSS feed of blog posts
- tag() — Renders the blog posts for a given tag.