Permalink
Browse files

MINOR Added Requirements for SilverStripeNavigator (see r99080) (from…

… r99098)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@106130 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 90ff558 commit 9a05d59f35920c301c62a25f5365c2ba0d1c90a6 @chillu chillu committed Jun 3, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 code/LeftAndMain.php
View
@@ -249,6 +249,10 @@ function init() {
Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.AddForm.js');
Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.BatchActions.js');
+ // navigator
+ Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css');
+ Requirements::javascript(SAPPHIRE_DIR . '/javascript/SilverStripeNavigator.js');
+
Requirements::themedCSS('typography');
foreach (self::$extra_requirements['javascript'] as $file) {
@@ -1058,6 +1062,16 @@ public function CMSVersion() {
return "cms: $cmsVersion, sapphire: $sapphireVersion";
}
+
+ /**
+ * @return array
+ */
+ function SwitchView() {
+ if($page = $this->currentPage()) {
+ $nav = SilverStripeNavigator::get_for_record($page);
+ return $nav['items'];
+ }
+ }
/**
* The application name. Customisable by calling

0 comments on commit 9a05d59

Please sign in to comment.