diff options
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/helpers/html_helper.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index e63a449b4..99041ed76 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -245,6 +245,56 @@ echo ul($list);</code> </ul>
</code>
+
+
+<h2>meta()</h2>
+
+<p>Helps you generate meta tags. You can pass strings to the function, or simple arrays, or multidimensional ones. Examples:</p>
+
+<code>
+echo meta('description', 'My Great site');<br />
+// Generates: <meta name="description" content="My Great Site" /><br />
+<br /><br />
+
+echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); // Note the third parameter. Can be "equiv" or "name"<br />
+// Generates: <meta http-equiv="Content-type" content="text/html; charset=utf-8" /><br />
+
+<br /><br />
+
+echo meta(array('name' => 'robots', 'content' => 'no-cache'));<br />
+// Generates: <meta name="robots" content="no-cache" /><br />
+
+<br /><br />
+
+$meta = array(<br />
+ array('name' => 'robots', 'content' => 'no-cache'),<br />
+ array('name' => 'description', 'content' => 'My Great Site'),<br />
+ array('name' => 'keywords', 'content' => 'love, passion, intrigue, deception'),<br />
+ array('name' => 'robots', 'content' => 'no-cache'),<br />
+ array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv')<br />
+ );<br />
+<br />
+echo meta($meta);
+<br />
+// Generates: <br />
+// <meta name="robots" content="no-cache" /><br />
+// <meta name="description" content="My Great Site" /><br />
+// <meta name="keywords" content="love, passion, intrigue, deception" /><br />
+// <meta name="robots" content="no-cache" /><br />
+// <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+</code>
+
+
+
+
+
+
+
+
+
+
+
+
</div>
<!-- END CONTENT -->
|