From 1f622294b92c095fd91e8ca44912d405c1605ded Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 7 Apr 2011 12:06:51 -0400 Subject: Wow, I screwed that up, Reactor is going to 2.0.2 not 2.0.1 --- user_guide/helpers/html_helper.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 c7ab413ba..1a0529f7b 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

-- cgit v1.2.3-24-g4f1b From 826429cf40a9624788b92d2e6e4b7659e1b0d8a1 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Mon, 18 Apr 2011 09:40:19 -0500 Subject: Added an optional third parameter to heading() which allows adding html attributes to the rendered heading tag. --- user_guide/helpers/html_helper.html | 5 +++++ 1 file changed, 5 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 1a0529f7b..308013d51 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -89,6 +89,11 @@ second the size of the heading. Example:

echo heading('Welcome!', 3);

The above would produce: <h3>Welcome!</h3>

+

Additionally, in order to add attributes to the heading tag such as HTML classes, ids or inline styles, a third parameter is available.

+echo heading('Welcome!', 3, 'class="pink"') +

The above code produces: <h3 class="pink">Welcome!<<h3>

+ +

img()

Lets you create HTML <img /> tags. The first parameter contains the image source. Example:

echo img('images/picture.jpg');
-- cgit v1.2.3-24-g4f1b From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- user_guide/helpers/html_helper.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (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 308013d51..665081fb6 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -84,10 +84,10 @@ HTML Helper

The above would produce: <br /><br /><br />

heading()

-

Lets you create HTML <h1> tags. The first parameter will contain the data, the -second the size of the heading. Example:

+

Lets you create HTML <h1> tags. The first parameter will contain the data, the +second the size of the heading. Example:

echo heading('Welcome!', 3); -

The above would produce: <h3>Welcome!</h3>

+

The above would produce: <h3>Welcome!</h3>

Additionally, in order to add attributes to the heading tag such as HTML classes, ids or inline styles, a third parameter is available.

echo heading('Welcome!', 3, 'class="pink"') @@ -95,7 +95,7 @@ second the size of the heading. Example:

img()

-

Lets you create HTML <img /> tags. The first parameter contains the image source. Example:

+

Lets you create HTML <img /> tags. The first parameter contains the image source. Example:

echo img('images/picture.jpg');
// gives <img src="http://site.com/images/picture.jpg" />

There is an optional second parameter that is a TRUE/FALSE value that specifics if the src should have the page specified by $config['index_page'] added to the address it creates. Presumably, this would be if you were using a media controller.

@@ -116,7 +116,7 @@ second the size of the heading. Example:

// <img src="http://site.com/index.php/images/picture.jpg" alt="Me, demonstrating how to eat 4 slices of pizza at one time" class="post_images" width="200" height="200" title="That was quite a night" rel="lightbox" />

link_tag()

-

Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates. +

Lets you create HTML <link /> tags. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, media and index_page. index_page is a TRUE/FALSE value that specifics if the href should have the page specified by $config['index_page'] added to the address it creates. echo link_tag('css/mystyles.css');
// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" />

Further examples:

@@ -271,20 +271,20 @@ echo ul($list, $attributes);

meta()

-

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

+

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" />
+// 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('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" />
+// Generates: <meta name="robots" content="no-cache" />


@@ -298,7 +298,7 @@ $meta = array(

echo meta($meta);
-// Generates:
+// Generates:
// <meta name="robots" content="no-cache" />
// <meta name="description" content="My Great Site" />
// <meta name="keywords" content="love, passion, intrigue, deception" />
@@ -319,7 +319,7 @@ echo doctype('html4-trans');
// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-

The following is a list of doctype choices. These are configurable, and pulled from application/config/doctypes.php

+

The following is a list of doctype choices. These are configurable, and pulled from application/config/doctypes.php

-- cgit v1.2.3-24-g4f1b