Use package to specify single-page names
Permalink
I am able to create a package which adds single-pages to the dashboard. How do I specify the name that appears in the menu if I do not wish it to be just the last item in the URL? Concrete\Core\Page\Single::add() does not appear to accept an argument to specify the name. Somewhere else? Thanks
/* * Adds a new single page at the given path, optionally specify a Package * @param string $cPath * @param Package $pkg * @return Page */ public static function add($cPath, $pkg = null, $moveToRoot = false) { Loader::helper('concrete/ui')->clearInterfaceItemsCache(); // instantiate the home collection so we have someplace to add these to $sites = \Core::make('site')->getList(); /** * @var $site Site */ foreach($sites as $site) {
Viewing 15 lines of 21 lines. View entire code block.