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

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

This example demonstrates the
XML we are going to use:
"A Grouped List" default="1" class="Some CSS">
Group 1




Group 2




Chapter 4
[ 97 ]
We use nested group tags to group the different options together. The option tags
are identical to those used by JElementList. For a complete description of menu select
lists, please refer to http://www.w3schools.com/tags/tag_optgroup.asp.
To build the JElementMenus class, there are two things we should always do when
defining JElement subclasses: override the fetchElement() method and set the
_name property.
To implement our fetchElement() method we will use the static JHTMLSelect
class; this class is used to build select lists and menu select lists. There are two
methods that we need to be aware of: JHTMLSelect::option() and JHTMLSelect::
genericList().


Pages:
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145