diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-01-30 17:55:30 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-01-30 17:55:30 +0100 |
commit | 0684897f89f8363dc431e8ade0535bce521a7af2 (patch) | |
tree | 956709e818d47e812e3aefb06ad7d7473cd3769f /user_guide/helpers | |
parent | f45c677e1432126fc4863c842ea36a494016e692 (diff) |
remove stylesheet() so as not to overly pollute function names, rename link() to link_tag() to avoid PHP collision.
Diffstat (limited to 'user_guide/helpers')
-rw-r--r-- | user_guide/helpers/html_helper.html | 23 |
1 files changed, 6 insertions, 17 deletions
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:</p> <code>echo heading('Welcome!', 3);</code>
<p>The above would produce: <h3>Welcome!</h3></p>
-<h2>link()</h2>
-<p>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.</p>
-<p>While stylesheets are more conveniently handled through the stylesheet() function, they can also be called here.</p>
-<code>
-link('css/mystyles.css');<br />
- // gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" /></code>
+<h2>link_tag()</h2>
+<p>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.<code>
+link_tag('css/mystyles.css');<br />
+// gives <link href="http://site.com/css/mystyles.css" rel="stylesheet" type="text/css" /></code></p>
<p>Further examples:</p>
<code>
- link('favicon.ico', 'shortcut icon', 'image/ico');<br />
+ link_tag('favicon.ico', 'shortcut icon', 'image/ico');<br />
// <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" />
<br />
<br />
@@ -103,18 +101,9 @@ link('css/mystyles.css');<br /> 'media' => 'print'<br />
);<br />
<br />
- link($link);<br />
+ link_tag($link);<br />
// <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" /></code></p>
-<h2>stylesheet()</h2>
-<p>The stylesheet() function simplifies the linking of CSS into your document. The arguments are stylesheet(href, optional rel, optional title, optional media).</p>
-<p>For more complete control over the output of the tag, you may want to use the link() function.</p>
-<code>stylesheet('foo.css');<br />
- // <link href="http://site.com/foo.css" rel="stylesheet" type="text/css" media="screen" /><br />
-<br />
-stylesheet('foo.css', 'alternate stylesheet', 'black and white version', 'screen') .'<br>';<br />
- // <link href="http://site.com/foo.css" rel="alternate stylesheet" type="text/css" media="screen" title="black and white version" />
-</code>
<h2>nbs()</h2>
<p>Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:</p>
<code>echo nbs(3);</code>
|