mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FEATURE: Added utility methods to enable and disable nested URLs to SiteTree.
From: Andrew Short <andrewjshort@gmail.com> git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88468 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d81d7593b3
commit
bd5b134c37
@ -195,6 +195,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
'Content',
|
||||
);
|
||||
|
||||
/**
|
||||
* @see SiteTree::nested_urls()
|
||||
*/
|
||||
private static $nested_urls = false;
|
||||
|
||||
/**
|
||||
* This controls whether of not extendCMSFields() is called by getCMSFields.
|
||||
*/
|
||||
@ -205,6 +210,23 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
*/
|
||||
private static $cache_permissions = array();
|
||||
|
||||
/**
|
||||
* Returns TRUE if nested URLs (e.g. page/sub-page/) are currently enabled on this site.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function nested_urls() {
|
||||
return self::$nested_urls;
|
||||
}
|
||||
|
||||
public static function enable_nested_urls() {
|
||||
self::$nested_urls = true;
|
||||
}
|
||||
|
||||
public static function disable_nested_urls() {
|
||||
self::$nested_urls = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a subclass map of SiteTree
|
||||
* that shouldn't be hidden through
|
||||
|
Loading…
x
Reference in New Issue
Block a user