Vorlage:Collapse: Unterschied zwischen den Versionen
Aus Afterbuy-Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
Zeile 2: | Zeile 2: | ||
if(is_array($argv) && !empty($argv)){ | if(is_array($argv) && !empty($argv)){ | ||
array_shift($argv); | array_shift($argv); | ||
− | + | $text='Lorem ÖÄÜöäü?!"§$%&/()=`´´+*#-_.:,;<> dolor sit amet, consetetur \'sadipscing\' elitr, sed diam "nonumy" eirmod tempor invidunt ut labore et dolore magna aliquyam'; | |
− | + | if(isset($argv['text']) && trim($argv['text']!="")){ | |
− | $text= | + | $text=addcslashes(trim($argv['text']),"'"); |
− | + | } | |
− | + | $id=md5($text); | |
− | $id=md5($text); | + | $class='light'; |
− | echo trim('<htmltag | + | if(isset($argv['class']) && trim($argv['class']!="")){ |
− | tagname="button" type="button" class="btn btn- | + | $class=trim($argv['class']); |
+ | } | ||
+ | $label='Anzeigen'; | ||
+ | if(isset($argv['label']) && trim($argv['label']!="")){ | ||
+ | $class=trim($argv['label']); | ||
+ | } | ||
+ | echo trim('<htmltag | ||
+ | tagname="button" type="button" class="btn btn-'.$class.' | ||
text-decoration-none small" | text-decoration-none small" | ||
data-toggle="collapse" | data-toggle="collapse" | ||
− | data-target="#collapse'.$id.'" aria-expanded="false" aria-controls="collapse'.$id.'"> | + | data-target="#collapse'.$id.'" aria-expanded="false" aria-controls="collapse'.$id.'">'.$label.'</htmltag> |
− | <div class="collapse" id="collapse'.$id.'">'. | + | <div class="collapse" id="collapse'.$id.'">'.$text.'</div>'); |
+ | } | ||
</phptag> | </phptag> |
Version vom 15. April 2021, 15:10 Uhr
Lorem ÖÄÜöäü?!"§$%&/()=`´´+*#-_.:,;<> dolor sit amet, consetetur 'sadipscing' elitr, sed diam "nonumy" eirmod tempor invidunt ut labore et dolore magna aliquyam