diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-23 23:00:27 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-23 23:00:27 +0200 |
commit | ee070ce824af51c5345ed764aea6703bec21bae9 (patch) | |
tree | fed80f586996b3984062a249550340667d67639d /user_guide/helpers | |
parent | f63b9f20afad7c5f494970285c8141cef7ec016f (diff) |
Diffstat (limited to 'user_guide/helpers')
-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 -->
|