Posts
Use this API to create, update and delete website posts.
Methods
Invoke via \Components\Website\Posts::method()
Click a method name to copy it.
Deletes a record from the database
Parameters
$iPostId
int
A record's post_id
Return
Returns true if record existed and was deleted, otherwise false
Datasource for retreiving a list of months with a filter that can be applied to API calls for posts.
Useful for creating a list of months that can be clicked to view the posts for that month.
Return
Array of ['date_start', 'date_end', 'filter', 'month']
Datasource for retreiving a list of years with a filter that can be applied to API calls for posts.
Useful for creating a list of years that can be clicked to view the posts for that month.
Return
Array of ['date_start', 'date_end', 'filter', 'month']
Gets a record from the database
Parameters
$iPostId
int
A record's post_id
Return a set of records from the database
Returns all posts for a single given category, or in any array of categories
Returns all posts that must belong to every category specified
Returns all posts linking to a page
Gets a single field from a record
Parameters
$iPostId
int
A record's post_id
Returns the number of records in the database (matching the filter if specified)
Returns the number of posts for a given category
Returns the most recent post linking to the current page
Returns the post after the one linked to the current page
Useful for including in your design to add a [Next Post] button
Returns the post before the one linked to the current page
Useful for including in your design to add a [Previous Post] button
Saves a record into the database
Saves a specific column of a row into a database
Parameters
$iPostId
int
A record's post_id
Return
Array of
Posts that match the search query.