From 7ecd53b7da5164a5a8c1c20b3ea5f67ebcfdabdf Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Sun, 10 Feb 2008 21:53:26 +0000 Subject: added echo statements to a few helper examples --- user_guide/helpers/html_helper.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 43ba244ad..1936cd1f7 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -81,10 +81,10 @@ second the size of the heading. Example:

img()

Lets you create HTML <img /> tags. The first parameter contains the image source. There is data, the second the size of the heading. Example:

-img('images/picture.jpg');
+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.

-

img('images/picture.jpg', TRUE);
+

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

Additionally, an associative array can be passed to the img() function for complete control over all attributes and values.

$image_properties = array(
@@ -101,16 +101,16 @@ 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. -link_tag('css/mystyles.css');
+echo link_tag('css/mystyles.css');
// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" />

Further examples:

- link_tag('favicon.ico', 'shortcut icon', 'image/ico');
+ echo link_tag('favicon.ico', 'shortcut icon', 'image/ico');
// <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" />

- link('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');
+ echo link('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');
// <link href="http://site.com/feed" rel="alternate" type="application/rss+xml" title="My RSS Feed" />

Additionally, an associative array can be passed to the link() function for complete control over all attributes and values.

@@ -121,7 +121,7 @@ link_tag('css/mystyles.css');
          'media' => 'print'
);

- link_tag($link);
+ echo link_tag($link);
// <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" />

nbs()

-- cgit v1.2.3-24-g4f1b