Revision 368f9611
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
71 | 71 |
my %attributes = _hashify(@_); |
72 | 72 |
|
73 | 73 |
$attributes{id} ||= $self->name_to_id($name); |
74 |
$options_str = $self->options_for_select($options_str) if ref $options_str; |
|
74 | 75 |
|
75 | 76 |
return $self->html_tag('select', $options_str, %attributes, name => $name); |
76 | 77 |
} |
... | ... | |
280 | 281 |
C<$options_string> and with arbitrary HTML attributes from |
281 | 282 |
C<%attributes>. The tag's C<id> defaults to C<name_to_id($name)>. |
282 | 283 |
|
283 |
The $options_string is usually created by the C<options_for_select> |
|
284 |
function. |
|
284 |
The C<$options_string> is usually created by the |
|
285 |
L</options_for_select> function. If C<$options_string> is an array |
|
286 |
reference then it will be passed to L</options_for_select> |
|
287 |
automatically. |
|
285 | 288 |
|
286 | 289 |
=item C<input_tag $name, $value, %attributes> |
287 | 290 |
|
Auch abrufbar als: Unified diff
select_tag: Automatischer Aufruf von options_for_select falls Optionen-Argument kein String ist