From 770551b104b966bdcb710853dc9f543bf0a1e619 Mon Sep 17 00:00:00 2001 From: dvio Date: Fri, 2 Dec 2011 18:11:11 +0700 Subject: [PATCH] [#1] Add &folderOnly parameter to show only container --- core/components/wayfinder/wayfinder.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/components/wayfinder/wayfinder.class.php b/core/components/wayfinder/wayfinder.class.php index 9aebbee..9d04852 100644 --- a/core/components/wayfinder/wayfinder.class.php +++ b/core/components/wayfinder/wayfinder.class.php @@ -44,6 +44,7 @@ function __construct(modX &$modx,array $config = array()) { 'ph' => false, 'debug' => false, 'ignoreHidden' =>false, + 'folderOnly' => false, 'hideSubMenus' => false, 'useWeblinkUrl' => true, 'fullLink' => false, @@ -535,6 +536,11 @@ public function getData() { if (!$this->_config['ignoreHidden']) { $c->where(array('hidemenu:=' => 0)); } + + /* added folder only option */ + if ($this->_config['folderOnly']) { + $c->where(array('isfolder:=' => 1)); + } /* if set, limit results to specific resources */ if (!empty($this->_config['includeDocs'])) {