From 0684897f89f8363dc431e8ade0535bce521a7af2 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 30 Jan 2008 16:55:30 +0000 Subject: remove stylesheet() so as not to overly pollute function names, rename link() to link_tag() to avoid PHP collision. --- user_guide/helpers/html_helper.html | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'user_guide/helpers') diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index 5ddadd717..d230a6630 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -79,16 +79,14 @@ second the size of the heading. Example:

echo heading('Welcome!', 3);

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

-

link()

-

Lets you create HTML <link /> tags. 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.

-

While stylesheets are more conveniently handled through the stylesheet() function, they can also be called here.

- -link('css/mystyles.css');
- // gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" />
+

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');
+// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" />

Further examples:

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

@@ -103,18 +101,9 @@ link('css/mystyles.css');
          'media' => 'print'
);

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

-

stylesheet()

-

The stylesheet() function simplifies the linking of CSS into your document. The arguments are stylesheet(href, optional rel, optional title, optional media).

-

For more complete control over the output of the tag, you may want to use the link() function.

-stylesheet('foo.css');
- // <link href="http://site.com/foo.css" rel="stylesheet" type="text/css" media="screen" />
-
-stylesheet('foo.css', 'alternate stylesheet', 'black and white version', 'screen') .'<br>';
- // <link href="http://site.com/foo.css" rel="alternate stylesheet" type="text/css" media="screen" title="black and white version" /> -

nbs()

Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:

echo nbs(3); -- cgit v1.2.3-24-g4f1b