templates
Posted in
224
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
bootstrap alert template Demo
View Demo Full Screen View Demo New Tab
bootstrap alert template Code
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();
Add Comment
Other Items in templates
Related Search Terms
Other Categories in Code
php functions
php functions
php functions