templates
Posted in
1
12:53 am, October 8, 2021
bootstrap alert template
here is a templated bootstrap alert where you can switch the alert type with the @alert_type variable.
Here are the different alerts:
- primary
- secondary
- success
- danger
- warning
- info
- light
- dark
HTML
<!-- Alert Basic -->
<div class="alert alert-primary mb-3" role="alert">
A simple primary alert—check it out!
</div>
<!-- Alert in Templated Form -->
<!-- insert of the alert types into the @alert_type -->
<div class="alert alert-[@alert_type] mb-3" role="alert">
[@content]
</div>
PHP
/*
Alert Template
primary
secondary
success
danger
warning
info
light
dark
*/
$alert_template = new template("alert.html");
$alert_template->set("alert_type", "warning");
$alert_template->set("content", "Message");
$alert_html = $alert_template->output();
A simple primary alert—check it out!
[@content]
View Statistics
This Week
52
This Month
242
This Year
0
Add Comment
Other Items in templates
Related Search Terms
Other Categories in Code
c testing apache apps asp bat bootstrap bootstrap templates core css css grid design elements fancybox fonts foundation framework gimp git html icons ideas images javascript jquery js linux mac nginx node php php functions php simple html dom pi400 python react sections site bugs site documentation sql sqlite sublime svg templates tools virtual box webdev windows wordpress