mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
96a448a4b2
commit
e818f89962
@ -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");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user