thanks aram,
I got some help from sam minnee on this and Works a treat!!
LeftAndMain::getSiteTreeFor() does most of the work - this is called in other places, passing "SiteTee", "Folder", or "Group" as necessary.
It's called by CMSMain::SiteTreeAsUL().
It's currently like this:
$obj = $rootID ? $this->getRecord($rootID) : singleton($className);
$obj->markPartialTree(30, $this);
if($p = $this->currentPage()) $obj->markToExpose($p);
You can probably change it to have a call to setMarkingFilter. I woudl recommend that you make this change by duplicating the whole LeftAndMain::getSiteTreeFor() in either CMSMain, or your own custom subclass of LeftAndMain.
$obj = $rootID ? $this->getRecord($rootID) : singleton($className);
--> $obj->setMarkingFilter('ShowInCMS', 1);
$obj->markPartialTree(30, $this);
if($p = $this->currentPage()) $obj->markToExpose($p);
This means that the tree will only show objects where $dataObj->ShowInCMS = 1;
public $ShowInCMS = 1; // on Page.php
public $ShowInCMS = 0; // on the class to exclude from the CMS.