VirtualPage
class VirtualPage extends Page (View source)
Virtual Page creates an instance of a page, with the same fields that the original page had, but readonly.
This allows you can have a page in mulitple places in the site structure, with different children without duplicating the content Note: This Only duplicates $db fields and not the $has_one etc..
Properties
static | $virtualFields |
Methods
Generates the array of fields required for the page type.
No description
No description
No description
For VirtualPage, add a canonical link tag linking to the original page See TRAC #6828 & http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
No description
No description
We can only publish the page if there is a published source page
Return true if we can delete this page from the live site, which is different from can we publish it.
Returns true if is page is publishable by anyone at all Return false if the source page isn't published yet.
Generate the CMS fields from the fields from the original page.
No description
We have to change it to copy all the content from the original page first.
No description
Ensure we have an up-to-date version of everything.
No description
No description
Allow attributes on the master page to pass through to the virtual page
Allow attributes on the master page to pass through to the virtual page
Pass unrecognized method calls on to the original data object
No description
Overwrite to also check for method on the original data object
Return the "casting helper" (a piece of PHP code that when evaluated creates a casted value object) for a field on this object.
Details
getVirtualFields()
Generates the array of fields required for the page type.
SiteTree
CopyContentFrom()
setCopyContentFromID($val)
ContentSource()
string
MetaTags(bool $includeTitle = true)
For VirtualPage, add a canonical link tag linking to the original page See TRAC #6828 & http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
allowedChildren()
syncLinkTracking()
canPublish($member = null)
We can only publish the page if there is a published source page
canDeleteFromLive($member = null)
Return true if we can delete this page from the live site, which is different from can we publish it.
isPublishable()
Returns true if is page is publishable by anyone at all Return false if the source page isn't published yet.
Note that isPublishable doesn't affect ete from live, only publish.
getCMSFields()
Generate the CMS fields from the fields from the original page.
getSettingsFields()
onBeforeWrite()
We have to change it to copy all the content from the original page first.
onAfterWrite()
copyFrom($source, $updateImageTracking = true)
Ensure we have an up-to-date version of everything.
updateImageTracking()
string
CMSTreeClasses(string $numChildrenMethod = "numChildren")
mixed
__get(string $field)
Allow attributes on the master page to pass through to the virtual page
mixed
__isset(string $field)
Allow attributes on the master page to pass through to the virtual page
mixed
__call(string $method, string $args)
Pass unrecognized method calls on to the original data object
bool
hasField(string $field)
bool
hasMethod(string $method)
Overwrite to also check for method on the original data object
string
castingHelper(string $field)
Return the "casting helper" (a piece of PHP code that when evaluated creates a casted value object) for a field on this object.