class BlogController extends PageController (View source)

Properties

protected DataList $blogPosts

The current Blog Post DataList query.

Methods

public
string
index(HTTPRequest $request)

No description

public
string
profile()

Renders a Blog Member's profile.

public
null|Member
getCurrentProfile()

Get the Member associated with the current URL segment.

public
null|DataList
getCurrentProfilePosts()

Get posts related to the current Member profile.

public
null|string
archive()

Renders an archive for a specified date. This can be by year or year/month.

public
int
getArchiveYear()

Fetches the archive year from the url.

public
null|int
getArchiveMonth()

Fetches the archive money from the url.

public
null|int
getArchiveDay()

Fetches the archive day from the url.

public
null|string
tag()

Renders the blog posts for a given tag.

public
null|BlogTag
getCurrentTag()

Tag Getter for use in templates.

public
null|string
category()

Renders the blog posts for a given category.

public
getCurrentCategory()

Category Getter for use in templates.

public
string
getMetaTitle()

Get the meta title for the current action.

public
string
getFilterDescription()

Returns a description of the current filter.

public
PaginatedList()

Returns a list of paginated blog posts based on the BlogPost dataList.

public
string|null
PaginationAbsoluteNextLink()

Returns the absolute link to the next page for use in the page meta tags. This helps search engines find the pagination and index all pages properly.

public
string|null
PaginationAbsolutePrevLink()

Returns the absolute link to the previous page for use in the page meta tags. This helps search engines find the pagination and index all pages properly.

public
string
rss()

Displays an RSS feed of blog posts.

public
null|DBDatetime
getArchiveDate()

Returns the current archive date.

public
string
getRSSLink()

Returns a link to the RSS feed.

protected
string
rssFeed(DataList $blogPosts, string $link)

Displays an RSS feed of the given blog posts.

protected
bool
isRSS()

Returns true if the $Rss sub-action for categories/tags has been set to "rss"

Details

string index(HTTPRequest $request)

No description

Parameters

HTTPRequest $request

Return Value

string

string profile()

Renders a Blog Member's profile.

Return Value

string

Exceptions

HTTPResponse_Exception

null|Member getCurrentProfile()

Get the Member associated with the current URL segment.

Return Value

null|Member

null|DataList getCurrentProfilePosts()

Get posts related to the current Member profile.

Return Value

null|DataList

null|string archive()

Renders an archive for a specified date. This can be by year or year/month.

Return Value

null|string

int getArchiveYear()

Fetches the archive year from the url.

Return Value

int

null|int getArchiveMonth()

Fetches the archive money from the url.

Return Value

null|int

null|int getArchiveDay()

Fetches the archive day from the url.

Return Value

null|int

null|string tag()

Renders the blog posts for a given tag.

Return Value

null|string

null|BlogTag getCurrentTag()

Tag Getter for use in templates.

Return Value

null|BlogTag

null|string category()

Renders the blog posts for a given category.

Return Value

null|string

null|BlogCategory getCurrentCategory()

Category Getter for use in templates.

Return Value

null|BlogCategory

string getMetaTitle()

Get the meta title for the current action.

Return Value

string

string getFilterDescription()

Returns a description of the current filter.

Return Value

string

PaginatedList PaginatedList()

Returns a list of paginated blog posts based on the BlogPost dataList.

Return Value

PaginatedList

Returns the absolute link to the next page for use in the page meta tags. This helps search engines find the pagination and index all pages properly.

Return Value

string|null

Examples

"<% if $PaginationAbsoluteNextLink %><link rel="next" href="$PaginationAbsoluteNextLink"><% end_if %>"

Returns the absolute link to the previous page for use in the page meta tags. This helps search engines find the pagination and index all pages properly.

Return Value

string|null

Examples

"<% if $PaginationAbsolutePrevLink %><link rel="prev" href="$PaginationAbsolutePrevLink"><% end_if %>"

string rss()

Displays an RSS feed of blog posts.

Return Value

string

null|DBDatetime getArchiveDate()

Returns the current archive date.

Return Value

null|DBDatetime

Returns a link to the RSS feed.

Return Value

string

protected string rssFeed(DataList $blogPosts, string $link)

Displays an RSS feed of the given blog posts.

Parameters

DataList $blogPosts
string $link

Return Value

string

protected bool isRSS()

Returns true if the $Rss sub-action for categories/tags has been set to "rss"

Return Value

bool