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 315 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

Instead of using grid, we use a list type, list.category, to render the
category filter form control.
Unlike grid.state, we must tell list.category the name of the control, the
extension name (category section), and the current category. Note that we cast the
value of $filter_catid to an integer for security reasons. Last of all, we include
some JavaScript.
This JavaScript forces the adminForm form to submit itself, applying the filter
immediately. The first entry in the resultant drop-down list is Select a Category. We
can opt to make our JavaScript slightly more intelligent by not submitting the form if
the Select a Category option is chosen, as this JavaScript demonstrates:
$js = "onchange=\"if (this.options[selectedIndex].value!='')
{ document.adminForm.submit(); }\"";
Now when we build our template, we can add the lists['catid'] value to the
table above the itemized data:







lists['catid']; ?>
lists['state']; ?>

Rendering Output
[ 236 ]
The final stage is to apply the category filter to the itemized data.


Pages:
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
web-marketing sprzedaż obrazów zapiekanki sopot humus Kasprowy Wierch