5121 Posts in 1527 Topics by 1119 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 892 Views |
-
Revove Pages from CMS Sitetree

14 August 2010 at 6:39am
I want to remove all pages with a page class of "Video" from the CMS sitetree.
-
Re: Revove Pages from CMS Sitetree

18 August 2010 at 3:23am
I've looked into this, but haven't got there yet... this is from my notes... (you'll need to replace 'Logger' with your own method of debugging... a solution would be much appreciated by me too as I gave up!
class Hierarchy {
...
function getChildrenAsUL {
Logger::log($this);if (isset($this->ClassName))
{
Logger::log($this->ClassName);$do = new DataObject();
$do->setCalssName($this->ClassName);
$strName = get_parent_class($do);if ($strName == 'YOURPAGECLASS')
return '';
}...
}
...
}
-
Re: Revove Pages from CMS Sitetree

20 October 2010 at 4:27pm
You can use the static $hide_ancestor var in class SiteTree but can only hide an ancestor I imagine, rather than any class.
-
Re: Revove Pages from CMS Sitetree

20 October 2010 at 11:49pm
With this I ended up making my pages non-existent in the sitetree, rather than hiding them...
| 892 Views | ||
|
Page:
1
|
Go to Top |



