ENHANCEMENT Setting default level for ContentController->getMenu($level = 1) to allow for calls without arguments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64144 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-10-13 20:08:59 +00:00
parent 96a448a4b2
commit e818f89962

View File

@ -133,7 +133,7 @@ class ContentController extends Controller {
/** /**
* Returns a fixed navigation menu of the given level. * Returns a fixed navigation menu of the given level.
*/ */
public function getMenu($level) { public function getMenu($level = 1) {
if($level == 1) { if($level == 1) {
$result = DataObject::get("SiteTree", "ShowInMenus = 1 AND ParentID = 0"); $result = DataObject::get("SiteTree", "ShowInMenus = 1 AND ParentID = 0");