diff options
Diffstat (limited to 'user_guide/helpers')
-rw-r--r-- | user_guide/helpers/html_helper.html | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index 7abe01af9..5ddadd717 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -88,16 +88,15 @@ link('css/mystyles.css');<br /> <p>Further examples:</p>
<code>
-link('favicon.ico', 'shortcut icon', 'image/ico');<br />
- // <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" /> </p>
-<br />
-<br />
-link('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');<br />
- // <link href="http://site.com/feed" rel="alternate" type="application/rss+xml" title="My RSS Feed" /> <br />
-<br />
-
-<br />
-$link = array(<br />
+ link('favicon.ico', 'shortcut icon', 'image/ico');<br />
+ // <link href="http://site.com/favicon.ico" rel="shortcut icon" type="image/ico" />
+ <br />
+ <br />
+ link('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');<br />
+ // <link href="http://site.com/feed" rel="alternate" type="application/rss+xml" title="My RSS Feed" /> </code>
+<p>Additionally, an associative array can be passed to the link() function for complete control over all attributes and values.</p>
+<p><code>
+ $link = array(<br />
'href' => 'css/printer.css',<br />
'rel' => 'stylesheet',<br />
'type' => 'text/css',<br />
@@ -105,8 +104,17 @@ $link = array(<br /> );<br />
<br />
link($link);<br />
- // <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" /></code>
+ // <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>
|