Quiq::Html::List - HTML-Aufzählungsliste
Quiq::Html::Base
Die Klasse dient der Erzeugung von Aufzählungslisten in HTML. Sie kann die beiden Listenarten
Ordered List (<ol>)
Unordered List (<ul>)
erzeugen. Siehe Abschnitt EXAMPLES.
Der Content aller List-Items besteht aus Text, d.h. <, >, & werden geschützt.
Content der List-Items.
Legt fest, ob die Aufzählungsliste eine Ordered List (<ol>) oder Unordered List (<ul>) ist.
Die Unordered List ist der Default.
Der Aufruf
$html = Quiq::Html::List->html($h, id => 'list01', class => 'list', isText => 1, items => ['Apfel & Birne','Orange','Pflaume','Zitrone'], );
liefert
<ul id="list01" class="list"> <li>Apfel & Birne</li> <li>Orange</li> <li>Pflaume</li> <li>Zitrone</li> </ul>
Eine Ordered List wird bei Setzung des Attributs type=>'ordered' erzeugt.
type=>'ordered'
$html = Quiq::Html::List->html($h, type => 'ordered', id => 'list02', class => 'list', isText => 1, items => ['Apfel & Birne','Orange','Pflaume','Zitrone'], );
<ol id="list02" class="list"> <li>Apfel & Birne</li> <li>Orange</li> <li>Pflaume</li> <li>Zitrone</li> </ol>
$obj = $class->new(@keyVal);
Instantiiere ein Aufzählungslisten-Objekt und liefere eine Referenz auf dieses Objekt zurück.
$html = $obj->html($h); $html = $class->html($h,@keyVal);
Generiere den HTML-Code eines Aufzählungslisten-Objekts und liefere diesen zurück. Als Klassenmethode gerufen, wird das Objekt intern erzeugt und mit den Attributen @keyVal instantiiert.
1.161
Frank Seitz, http://fseitz.de/
Copyright (C) 2019 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.