Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo

Pages for bottom menu only


Go to End
Reply


4 Posts   1395 Views

Avatar
Tyndie

Community Member, 9 Posts

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

Avatar
Liam

Community Member, 470 Posts

10 October 2008 at 6:13am

Avatar
Tyndie

Community Member, 9 Posts

10 October 2008 at 10:50am

Cool thanks. Using other cms's for the last 7 years has made me lazy

Avatar
Tyndie

Community Member, 9 Posts

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); 
 }
}

?>