public static function addGlobal($cPath, $pkg = null)
    {
        $pathToFile = static::getPathToNode($cPath, $pkg);
        $txt = Loader::helper('text');
        $c = CorePage::getByPath($cPath);
        if ($c->isError() && $c->getError() == COLLECTION_NOT_FOUND) {
            // create the page at that point in the tree

            $data = array();
            $data['handle'] = trim($cPath, '/');
            $data['name'] = $txt->unhandle($data['handle']);
            $data['filename'] = $pathToFile;
            $data['uID'] = USER_SUPER_ID;
            if ($pkg != null) {
                $data['pkgID'] = $pkg->getPackageID();
            }

            $c = Page::addStatic($data, null);
            $c->moveToRoot();
            return $c;
        }
    }