17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1160 Views |
-
Pages for bottom menu only

10 October 2008 at 12:22am
Hi,
Is it possible to build pages which would be used on a bottom menu only, but excluded from the top menu? Like for example terms and conditions, privacy policy
-
Re: Pages for bottom menu only

10 October 2008 at 6:13am
This recipe shows the code how to do that
http://doc.silverstripe.com/doku.php?id=recipes:page_selection_for_special_menu
-
Re: Pages for bottom menu only

10 October 2008 at 10:50am
Cool thanks. Using other cms's for the last 7 years has made me lazy
-
Re: Pages for bottom menu only

10 October 2008 at 10:57am
This is mine. a slight difference in the Page_Controller extends ContentController class:
<?php
class Page extends SiteTree {
static $db = array(
"ShowInTabMenu" => "Boolean"
);
static $defaults = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Behaviour", new CheckboxField("ShowInTabMenu", "Show In Bottom Menu"));
return $fields;
}
}class Page_Controller extends ContentController {
function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
function topTabbers() {
$whereStatement = "ShowInTabMenu = 1 AND ShowInMenus = 1";
return DataObject::get("Page", $whereStatement);
}
}?>
| 1160 Views | ||
|
Page:
1
|
Go to Top |


