Revision ffdfdc7e
Von Sven Schöling vor fast 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
481 | 481 |
=item C<tabbed \@tab, %attributes> |
482 | 482 |
|
483 | 483 |
Will create a tabbed area. The tabs should be created with the helper function |
484 |
C<tab> |
|
484 |
C<tab>. Example: |
|
485 |
|
|
486 |
[% L.tabbed([ |
|
487 |
L.tab(LxERP.t8('Basic Data'), 'part/_main_tab.html'), |
|
488 |
L.tab(LxERP.t8('Custom Variables'), 'part/_cvar_tab.html', if => SELF.display_cvar_tab), |
|
489 |
]) %] |
|
490 |
|
|
491 |
An optional attribute is C<selected>, which accepts the ordinal of a tab which |
|
492 |
should be selected by default. |
|
485 | 493 |
|
486 | 494 |
=back |
487 | 495 |
|
... | ... | |
531 | 539 |
this element can be set with the option C<empty_title> and defaults to |
532 | 540 |
an empty string. |
533 | 541 |
|
542 |
=item C<tab, description, target, %PARAMS> |
|
543 |
|
|
544 |
Creates a tab for C<tabbed>. The description will be used as displayed name. |
|
545 |
The target should be a block or template that can be processed. C<tab> supports |
|
546 |
a C<method> parameter, which can override the process method to apply target. |
|
547 |
C<method => 'raw'> will just include the given text as is. I was too lazy to |
|
548 |
implement C<include> properly. |
|
549 |
|
|
550 |
Also an C<if> attribute is supported, so that tabs can be suppressed based on |
|
551 |
some occasion. In this case the supplied block won't even get processed, and |
|
552 |
the resulting tab will get ignored by C<tabbed>: |
|
553 |
|
|
554 |
L.tab('Awesome tab wih much info', '_much_info.html', if => SELF.wants_all) |
|
555 |
|
|
534 | 556 |
=back |
535 | 557 |
|
536 | 558 |
=head1 MODULE AUTHORS |
Auch abrufbar als: Unified diff
Dokumentation