diff options
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/changelog.html | 1 | ||||
-rw-r--r-- | user_guide/helpers/html_helper.html | 54 |
2 files changed, 37 insertions, 18 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index c37b0951c..2ccfbd88c 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -131,6 +131,7 @@ Change Log <li>Helpers & Plugins
<ul>
+ <li>Added link() to the <a href="./helpers/html_helper.html">HTML helper.</a></li>
<li>Added ability to <a href="./general/helpers.html">"extend" Helpers</a>.</li>
<li>Added an <a href="./helpers/email_helper.html">email helper</a> into core helpers.</li>
<li>Added <kbd>strip_quotes()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li>
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index e07f27778..7abe01af9 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -68,16 +68,49 @@ Directory Helper <p>The following functions are available:</p>
+<h2>br()</h2>
+<p>Generates line break tags (<br />) based on the number you submit. Example:</p>
+<code>echo br(3);</code>
+<p>The above would produce: <br /><br /><br /></p>
<h2>heading()</h2>
-
<p>Lets you create HTML <h1> tags. The first parameter will contain the data, the
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>
+<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 />
+ 'href' => 'css/printer.css',<br />
+ 'rel' => 'stylesheet',<br />
+ 'type' => 'text/css',<br />
+ 'media' => 'print'<br />
+ );<br />
+ <br />
+ link($link);<br />
+ // <link href="http://site.com/css/printer.css" rel="stylesheet" type="text/css" media="print" /></code>
+
+<h2>nbs()</h2>
+<p>Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:</p>
+<code>echo nbs(3);</code>
+<p>The above would produce: &nbsp;&nbsp;&nbsp;</p>
<h2>ol() and ul()</h2>
@@ -196,21 +229,6 @@ echo ul($list);</code> </ul>
</code>
-
-<h2>nbs()</h2>
-<p>Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:</p>
-<code>echo nbs(3);</code>
-<p>The above would produce: &nbsp;&nbsp;&nbsp;</p>
-
-
-<h2>br()</h2>
-<p>Generates line break tags (<br />) based on the number you submit. Example:</p>
-<code>echo br(3);</code>
-<p>The above would produce: <br /><br /><br /></p>
-
-
-
-
</div>
<!-- END CONTENT -->
|