Page 9 of 16
5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13

Sam :: 06.03.2012 00:49:34
Hi, this is great, works perfectly with Cake 2.0.x, thanks a lot! Quick question : if I want to display a line of information, say something like:

"Filtering for $fieldName with $value"

how would I get the filter values so I can display that in the view?
lecterror :: 09.03.2012 00:02:55
Hey Sam! Check out your session with DebugKit, you'll see everything there ;)
Pdefert :: 11.04.2012 10:37:49
Hi,
i add a very cool feature to Filter, => The multiSelect !!!!
i put a simple options to select filter :
multiple => true or checkbox

in FilterComponent.php ,function beforeRender() at the end of switch case ' select', I put this code :
if ($settings['multiple'])
{
$options['multiple'] =$settings['multiple'];
}

to use it :
'Document.user_id' => array
(
'type' => 'select',
'multiple'=>'true',
'label' => 'Document owner',
'selector' => 'getOwnerList'
)

The plugin does the rest of the job !

Philippe
lecterror :: 17.04.2012 13:54:32
Hey Philippe, that's great news! I'll include this as soon as catch a break to write some tests for it. Thanks!
Sam :: 25.05.2012 18:34:14
Hey, so I was able to get the listing working using this code... in case it is helpful:

$filterString = '';
foreach ($this->viewVars['viewFilterParams'] as $filter2) {
if (!isset($filter2['options']['value'])) continue;
$value = $filter2['options']['value'];
$name = $filter2['name'];
if (!($filterString === '')) $filterString .= ', ';
$filterString .= "<b>$value</b> " . __('in') .
" <i>$name</i>";
}
if (!($filterString === '')) {
echo '<div id="tr_filterinfo">';
echo __('Filtered by') . ': ' . $filterString;
echo '</div>';
}