Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: HTML
Posted by: Matt Lowe
Added: Dec 22, 2017 12:15 PM
Modified: Dec 22, 2017 12:31 PM
Views: 10
Basic HTML template header including bootstrap and smarty loop for included CSS files
Smarty array :
$pageFormat['title'] -> Web page title
$pageFormat['css'] -> Array of links to CSS files
  1. <!doctype html>
  2. <html lang="en">
  3.     <meta charset="utf-8">
  4.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  5.     <title>{$pageFormat['title']}</title>
  6.     <!-- Bootstrap CSS -->
  7.     <link rel="stylesheet" type="text/css"
  8.          href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
  9.     <link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  10.     {* Add any requested CSS files *}
  11.     {if $pageFormat['css'] != ''}
  12.         {foreach $pageFormat['css'] as $link}
  13.             <link rel="stylesheet" type="text/css" href="{$link}"/>
  14.         {/foreach}
  15.     {/if}
  16. </head>