From ee070ce824af51c5345ed764aea6703bec21bae9 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Thu, 23 Oct 2008 21:00:27 +0000 Subject: --- user_guide/helpers/html_helper.html | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'user_guide/helpers/html_helper.html') 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); </ul> + + +

meta()

+ +

Helps you generate meta tags. You can pass strings to the function, or simple arrays, or multidimensional ones. Examples:

+ + +echo meta('description', 'My Great site');
+// Generates: <meta name="description" content="My Great Site" />
+

+ +echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); // Note the third parameter. Can be "equiv" or "name"
+// Generates: <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ +

+ +echo meta(array('name' => 'robots', 'content' => 'no-cache'));
+// Generates: <meta name="robots" content="no-cache" />
+ +

+ +$meta = array(
+        array('name' => 'robots', 'content' => 'no-cache'),
+        array('name' => 'description', 'content' => 'My Great Site'),
+        array('name' => 'keywords', 'content' => 'love, passion, intrigue, deception'),
+        array('name' => 'robots', 'content' => 'no-cache'),
+        array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv')
+    );
+
+echo meta($meta); +
+// Generates:
+// <meta name="robots" content="no-cache" />
+// <meta name="description" content="My Great Site" />
+// <meta name="keywords" content="love, passion, intrigue, deception" />
+// <meta name="robots" content="no-cache" />
+// <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> +
+ + + + + + + + + + + + -- cgit v1.2.3-24-g4f1b