public static function calc_base_directory_for_object(DataObject $do)
    {

        //the 2 base options - dataobjects / pages
        $str = 'dataobjects';
        $ancestry = $do->getClassAncestry();
        foreach ($ancestry as $c) {
            if ($c == 'SiteTree') {
                $str = 'pages';
            }
        }

        //other options
        switch ($do->ClassName) {

            //case 'Subsite':
            //	$str = 'subsites';
            //	break;

            case 'SiteConfig':
                $str = 'site';
                break;

            default:
        }

        return $str;
    }