Pages
Use this API to create, update and delete website pages.
Methods
Invoke via \Components\Website\Pages::method()
Click a method name to copy it.
Return
Page row corresponding to the current page visited
Retreives an attribute for the current page
Return
Value of the attribute
Returns whether the current page is a child page of $strPageId
Returns the current page id
'/' when visiting the home page '/about/' when visiting about page etc.
Return
Page id corresponding to the current page visited
If the page is handling a child 404 request, the page query returns the child part
Deletes a record from the database
Parameters
$strPageId
string
A record's page_id
Return
Returns true if record existed and was deleted, otherwise false
Gets a record from the database
Parameters
$strPageId
string
A record's page_id
Return a set of records from the database
Returns all pages nested directly underneath a page
Returns the number of pages nested directly underneath a page
Returns all pages nested directly underneath a page
Retrieves the children of a specific page, but includes redirectors which appear in navigation
Gets a single field from a record
Parameters
$strPageId
string
A record's page_id
Returns the number of records in the database (matching the filter if specified)
Saves a record into the database
Saves a specific column of a row into a database
Parameters
$strPageId
string
A record's page_id
Return
Array of
Pages that match the search query.