Templating
Global Functions
Website
\Components\Website\Designs \Components\Website\Pages \Components\Website\Pages\Forms \Components\Website\Posts \Components\Website\Posts\Categories
Customers
\Components\Customers\Contacts \Components\Customers\Contacts\Relationships \Components\Customers\Contacts\Relationships\Types \Components\Customers\Groups
Marketing
\Components\Marketing\EmailMarketing \Components\Marketing\Events \Components\Marketing\Events\Attendees \Components\Marketing\Events\Locations
Commerce
\Components\Commerce\Configuration\PaymentMethods \Components\Commerce\Configuration\ShippingMethods \Components\Commerce\Discounts \Components\Commerce\Products \Components\Commerce\Products\Brands \Components\Commerce\Products\Categories \Components\Commerce\Products\Inventory \Components\Commerce\Sales \Components\Commerce\Sales\Items \Components\Commerce\Sales\Receipts \Components\Commerce\Sales\Receipts\Allocations
Settings
\Components\Settings\Administrators \Components\Settings\Domains
Other Apps
\Components\Website\Comments \Components\Commerce\Affiliates \Components\Commerce\Affiliates\Administrators \Components\Commerce\Affiliates\Commissions \Components\Commerce\Affiliates\Payments \Components\Commerce\RecurringSales \Components\Commerce\RecurringSales\StoredCards
Framework
\Framework\Caching\FileBased \Framework\Data\Util \Framework\HTML\Converters \Framework\HTTP\Cookies \Framework\HTTP\Redirection \Framework\HTTP\Request \Framework\HTTP\Session \Framework\HTTP\UserAgent \Framework\I18N\CompanyTypes \Framework\I18N\Countries \Framework\I18N\Languages \Framework\Network\GeoIP
Methods

\Components\Website\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.
array current()
Returns the current page
Return
Page row corresponding to the current page visited
string currentGetColumn($strColumn)
Retreives an attribute for the current page
Parameters
$strColumn
string
Return
Value of the attribute
bool currentIsChildPageOf($strPageId, $bIncludePage)
Returns whether or not the current page is a child page of $strPageId
Parameters
$strPageId
string
$bIncludePage
bool
If true, returns true if $strPageId == currentPageId()
Return
bool
string currentPageId()
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
string currentPageQuery()
If the page is handling a child 404 request, the page query returns the child part
Return
Query
array get($strPageId)
Gets a record from the database
Parameters
$strPageId
string
A record's page_id
Return
array getAll($arrQuery)
Return a set of records from the database
Parameters
$arrQuery
array|null
Return
Array of Pages
array getChildren($strId, $arrQuery)
Returns all pages nested directly underneath a page
Parameters
$strId
string
Page Id
$arrQuery
array|null
Return
Array of Pages
int getChildrenCount($strPageId, $arrFilter)
Returns the number of pages nested directly underneath a page
Parameters
$strPageId
string
Page Id
$arrFilter
array
Return
int
array getChildrenRecursive($strId, $arrQuery)
Returns all pages nested directly underneath a page
Parameters
$strId
string
Page Id
$arrQuery
array|null
Return
Array of Pages
array getChildrenWithRedirectors($strId, $arrQuery)
Retrieves the children of a specific page, but includes redirectors which appear in navigation
Parameters
$strId
string
$arrQuery
array|null
Return
Array of Pages
mixed getColumn($strPageId, $strColumn)
Gets a single field from a record
Parameters
$strPageId
string
A record's page_id
$strColumn
string
Return
mixed
int getCount($arrFilter)
Returns the number of records in the database (matching the filter if specified)
Parameters
$arrFilter
array|null
Return
int
string save($arrEntity)
Saves a record into the database
Parameters
$arrEntity
array
Return
The record's page_id
void saveColumn($strPageId, $strColumn, $strValue)
Saves a specific column of a row into a database
Parameters
$strPageId
string
A record's page_id
$strColumn
string
$strValue
string
array search($strSearch, $arrQuery)
Performs a search
Parameters
$strSearch
string
Search query
$arrQuery
array|null
Return
Array of Pages that match the search query.
bool delete($strPageId, $bDeleteMedia)
Deletes a record from the database
Parameters
$strPageId
string
A record's page_id
$bDeleteMedia
bool
Return
Returns true if record existed and was deleted, otherwise false

Database Fields

The following fields are used when retrieving and saving entities.
page_id
string (255)
page_created
datetime
Default value: 0000-00-00 00:00:00
page_last_modified
datetime
Default value: 0000-00-00 00:00:00
page_title
string (127)
page_icon
string (255)
page_content
string (16777215)
page_content_additional
string (16777215)
page_css
string (16777215)
page_js
string (16777215)
page_php_source
string (16777215)
page_accept_child_404
0 or 1
page_search_title
string (255)
page_search_title_prefix
string (255)
page_search_title_prefix_inherited
string (255)
page_search_description
string (255)
page_search_description_inherited
string (255)
page_search_keywords
string (255)
page_search_keywords_inherited
string (255)
page_search_noindex
0 or 1
page_search_nofollow
0 or 1
page_search_change_frequency
string (16)
page_search_priority
decimal unsigned (2,1)
Default value: 0.5
page_search_canonical_override
string (255)
page_visits_total
int unsigned (10)
page_is_offline
0 or 1
page_is_hidden_in_navigation
0 or 1
page_is_hidden_in_sitemap
0 or 1
page_security_new
0 or 1
page_security_contact_mode
page_security_contact_squeeze_viewlimit
int unsigned
page_security_contact_require_login
0 or 1
page_security_contact_groups
string (65535)
page_security_condition_id
int unsigned
page_security_heading
string (255)
page_security_description
string (255)
page_other_fields
string (65535)
page_order
int (11)
page_parent_id
string (255)
contact_id
int (11)
design_id
int (11)
page_header_functions
string (65535)
page_header_category
string (255)
page_is_domain
0 or 1