CWP\CWP\PageTypes\BasePage
`BasePage` is a foundation page class which can be used for constructing your own page types. By default it is hidden from the CMS - we rely on developers creating their own `Page` class in `mysite/code` which will extend from `BasePage`.
Please note: you should generally always extend `Page` with your custom page types. Refrain from subclassing
`BasePage` directly. Doing so will omit `Page` from your custom class's hierarchy, and this can have unintended
side effects where modules rely on modifying things on the `Page` class, as well as with templates and themes.
Synopsis
class BasePage
extends SiteTree
{
- // members
- private static $hide_ancestor = BasePage::class;
- private static array $api_access = ;
- private static string $table_name = 'BasePage';
- private static string $related_pages_title = 'Related pages';
- private static array $many_many = ;
- private static array $owns = ;
- private static array $belongs_many_many = ;
- private static array $many_many_extraFields = ;
- private static string $plural_name = 'Base Pages';
- // methods
- public void getFooter()
- public void RelatedPages()
- public void RelatedPagesTitle()
- public void getCMSFields()
- public string getSelectedLanguage()
Hierarchy
Extends
- SilverStripe\CMS\Model\SiteTree
Members
private
- $api_access
- $belongs_many_many
-
$hide_ancestor
Hide this page type from the CMS. hide_ancestor is slightly misnamed, should really be just "hide" - $many_many
- $many_many_extraFields — array
- $owns
- $plural_name
- $table_name
Methods
public
- RelatedPages()
- RelatedPagesTitle()
- getCMSFields()
- getSelectedLanguage() — Returns the native language name for the selected locale/language, empty string if Fluent is not available