SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 317 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

Note that we cast $filter_catid to an integer; this
ensures the value is safe for use with the database.
Before we move on to explain how to implement a search filter, we will quickly
discuss the use of other filters.
So far we have demonstrated how to use grid.state and list.category. There
are many other things on which we might want to filter itemized data. Some of these
are easily available through the list types, for example list.positions. These are
described earlier in the chapter.
If there isn't a suitable list type, we can construct our own filter drop-down
selection boxes using the select types. This is an example of how we might construct
a custom drop-down selection filter form control (it assumes $js is the same as in
the previous examples):
// prepare database
$db =& JFactory::getDBO();
$query = 'SELECT value, text' .
'FROM #__sometable' .
'ORDER BY ordering';
$db->setQuery($query);
// add first 'select' option
$options = array()
$options[] = JHTML::_('select.option', '0', '- '.


Pages:
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6