\Website\Pages
Templating
Global Functions
Website
\Components\Website\Designs \Components\Website\Media \Components\Website\Pages
METHODS
\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\Categories \Components\Marketing\Events\Locations
Commerce
\Components\Commerce\Carts \Components\Commerce\Carts\Current \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\CustomFields \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 \Framework\Data\Util \Framework\DOM\CurrentContext \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

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|null 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
mixed
Return
Value of the attribute
bool currentIsChildPageOf($strPageId, $bIncludePage)
Returns whether the current page is a child page of $strPageId
Parameters
$strPageId
mixed
$bIncludePage
mixed
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
bool delete($strPageId, $bDeleteMedia)
Deletes a record from the database
Parameters
$strPageId
string
A record's page_id
$bDeleteMedia
mixed
Return
Returns true if record existed and was deleted, otherwise false
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
mixed
Return
Array of Pages
array getChildren($strId, $arrQuery)
Returns all pages nested directly underneath a page
Parameters
$strId
mixed
$arrQuery
mixed
Return
Array of Pages
int getChildrenCount($strPageId, $arrFilter)
Returns the number of pages nested directly underneath a page
Parameters
$strPageId
mixed
$arrFilter
mixed
Return
int
array getChildrenRecursive($strId, $arrQuery)
Returns all pages nested directly underneath a page
Parameters
$strId
mixed
$arrQuery
mixed
Return
Array of Pages
array getChildrenWithRedirectors($strId, $arrQuery)
Retrieves the children of a specific page, but includes redirectors which appear in navigation
Parameters
$strId
mixed
$arrQuery
mixed
Return
Array of Pages
mixed getColumn($strPageId, $strColumn)
Gets a single field from a record
Parameters
$strPageId
string
A record's page_id
$strColumn
mixed
Return
mixed
int getCount($arrFilter)
Returns the number of records in the database (matching the filter if specified)
Parameters
$arrFilter
mixed
Return
int
string|int save($arrEntity)
Saves a record into the database
Parameters
$arrEntity
mixed
Return
string|int
void saveColumn($strPageId, $strColumn, $strValue)
Saves a specific column of a row into a database
Parameters
$strPageId
string
A record's page_id
$strColumn
mixed
$strValue
mixed
array search($strSearch, $arrQuery)
Performs a search
Parameters
$strSearch
mixed
$arrQuery
mixed
Return
Array of Pages that match the search query.

Database Fields

The following fields are used when retrieving and saving entities.
page_id
string (255)
page_created
datetime
Default value: current_timestamp()
page_last_modified
datetime
Default value: current_timestamp()
page_title
string (127)
page_icon
string (255)
page_content
string (4294967295)
page_content_additional
string (4294967295)
page_css
string (4294967295)
page_js
string (4294967295)
page_php_source
string (4294967295)
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_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 (16777215)
page_security_condition_id
int unsigned
page_security_heading
string (255)
page_security_description
string (255)
page_other_fields
string (16777215)
page_order
int (11)
page_parent_id
string (255)
contact_id
int (11)
design_id
int (11)
page_header_functions
string (16777215)
page_header_category
string (255)
page_is_domain
0 or 1