-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml.html
More file actions
886 lines (842 loc) · 23.4 KB
/
html.html
File metadata and controls
886 lines (842 loc) · 23.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Class - Fuel Documentation</title>
<link href="../assets/css/main.css" media="screen" rel="stylesheet" />
<script type="text/javascript" src="../assets/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../assets/js/nav.js"></script>
<script type="text/javascript" src="../assets/js/highlight.pack.js"></script>
<script type="text/javascript">
$(function() {
show_nav('classes', '../');
});
hljs.tabReplace = ' ';
hljs.initHighlightingOnLoad();
</script>
</head>
<body>
<header>
<h1>Fuel Documentation</h1>
</header>
<div id="main-nav"></div>
<section id="content">
<h2>Html Class</h2>
<p>The html class is an html wrapper for nearly all html tags.</p>
<h5>Doctypes</h5>
<p>We have included a configuration file located at <kbd>fuel/core/config/doctypes.php</kbd> which has all the doctypes.</p>
<article>
<h4 id="method_h">h($content = '', $num = 1, $attr = false)</h4>
<p>The <strong>h</strong> method returns an html heading tag. As you might be aware off the html heading tags come in 6 variations from h1 to h6.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$content</kbd></th>
<td><i>required</i></td>
<td>Content to be found between the heading tags.</td>
</tr>
<tr>
<th><kbd>$num</kbd></th>
<td><strong>1</strong></td>
<td>Designated number of the heading tag, if no value is supplied, will default to 1.</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>false</strong></td>
<td>Array of attributes to be applied to the heading tag. Content to be found between the heading tags.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated heading tags with its content(and attributes if supplied).</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <h1>Example</h1>
echo Html::h('Example');
//returns <h2 id="h2" class="sample" style="color:red;">Some other example</h2>
echo Html::h('Some other example', '2', array('id' => 'h2', 'class' => 'sample', 'style' => 'color:red'));
//returns <h3 id="sample" class="sample" style="color:blue;">Variable!</h3>
$attributes = array('id' => 'sample', 'class' => 'sample', 'style' => 'color:blue');
echo Html::h('Variable!', '3', $attributes);</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_anchor">anchor($href, $text, $attributes = array())</h4>
<p>The <strong>anchor</strong> method returns an html anchor tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$href</kbd></th>
<td><i>required</i></td>
<td>Target url</td>
</tr>
<tr>
<th><kbd>$text</kbd></th>
<td><i>required</i></td>
<td>Anchor value</td>
</tr>
<tr>
<th><kbd>$attributes</kbd></th>
<td><strong>false</strong></td>
<td>Array of attributes to be applied to the anchor tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated anchor tag (and attributes if supplied).</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <a href="http://www.domain.com/example">Example</a>
echo Html::anchor('example', 'Example');
//returns <a href="http://www.otherdomain.com/example">Example</a>
echo Html::anchor('http://www.otherdomain.com/example', 'Example');
//returns <a href="http://www.domain.com/example" id="a1" class="sample" style="color:red;">Example</a>
echo Html::anchor('example', 'Example', array('id' => 'a1', 'class' => 'sample', 'style' => 'color:red'));</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_mail_to">mail_to($email, $text, $subject = null, $attr = array())</h4>
<p>The <strong>mail_to</strong> method returns an html anchor tag with mailto as target.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$email</kbd></th>
<td><i>required</i></td>
<td>Email address</td>
</tr>
<tr>
<th><kbd>$text</kbd></th>
<td><i>required</i></td>
<td>Anchor value</td>
</tr>
<tr>
<th><kbd>$subject</kbd></th>
<td><strong>null</strong></td>
<td>Anchor value</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>empty</strong></td>
<td>Array of attributes to be applied to the anchor tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated anchor tag (and attributes if supplied).</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <a href="mailto:name@domain.com">Name</a>
echo Html::mail_to('name@domain.com', 'Name');
//returns <a href="mailto:name@domain.com?subject=Something">Name</a>
echo Html::mail_to('name@domain.com', 'Name', 'Something');
//returns <a href="mailto:name@domain.com" id="a2" class="sample" style="color:red;">Name</a>
echo Html:::mail_to('name@domain.com', 'Name', null, array('id' => 'a2', 'class' => 'sample', 'style' => 'color:red'));</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_mail_to_safe">mail_to_safe($email, $text, $subject = null, $attr = array())</h4>
<p>The <strong>mail_to_safe</strong> method returns javascript code that produces an html anchor tag with mailto as target.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$email</kbd></th>
<td><i>required</i></td>
<td>Email address</td>
</tr>
<tr>
<th><kbd>$text</kbd></th>
<td><i>required</i></td>
<td>Anchor value</td>
</tr>
<tr>
<th><kbd>$subject</kbd></th>
<td><strong>null</strong></td>
<td>Anchor value</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>empty</strong></td>
<td>Array of attributes to be applied to the anchor tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated anchor tag (and attributes if supplied).</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns
//<script type="text/javascript">
// var user = "name";
// var at = "@";
// var server = "domain.com";
// document.write('<a href="' + 'mail' + 'to:' + user + at + server + '">Name</a>');
//</script>
echo Html::mail_to_safe('name@domain.com', 'Name');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_br">br($num = 1, $attr = false)</h4>
<p>The <strong>br</strong> method returns an html break tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$num</kbd></th>
<td><strong>1</strong></td>
<td>Number of times the break tag should be outputted. If no value is given will default to 1.</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>false</strong></td>
<td>Array of attributes to be applied to the break tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated break tags with its attributes if supplied.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <br />
echo Html::br();
//returns <br id="example" class="sample" style="color:red;" /><br id="h2" class="sample" style="color:red;" />
echo Html::br('2', array('id' => 'example', 'class' => 'sample', 'style' => 'color:red'));
</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_hr">hr($attr = false)</h4>
<p>The <strong>hr</strong> method returns an html ruler tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>false</strong></td>
<td>Array of attributes to be applied to the ruler tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated ruler tag with its attributes if supplied.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <hr />
echo Html::hr();
//returns <hr id="example" class="sample" style="color:red;" />
echo Html::hr(array('id' => 'example', 'class' => 'sample', 'style' => 'color:red'));
</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_title">title($content = '')</h4>
<p>The <strong>title</strong> method returns an html title tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$content</kbd></th>
<td><i>required</i></td>
<td>Content to be found between the title tags.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated title tag with its content.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <title>Some Title!</title>
echo Html::title('Some title!');
//returns <title></title>
echo Html::title('');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_nbs">nbs($num = 1)</h4>
<p>The <strong>nbs</strong> method returns ascii code for non-breaking whitespaces.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$num</kbd></th>
<td><strong>1</strong></td>
<td>Number of non-breaking spaces to be outputted.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated ascii code for non-breaking whitespaces.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns &nbsp;
echo Html::nbs();
//returns &nbsp;&nbsp;
echo Html::nbs(2);</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_img">img($src, $attr = array())</h4>
<p>The <strong>img</strong> method returns an image tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$src</kbd></th>
<td><i>required</i></td>
<td>Path to image.</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>array()</strong></td>
<td>Attributes array. If no alt attribute is supplied, the alt attribute defaults to the filename.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated image tag.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <img src="http://example.com/path/to/image.png" alt="image.png" />
echo Html::img('path/to/image.png');
//returns <img src="http://example.com/path/to/image.png" alt="Alt Message" class="myclass" />
echo Html::img('path/to/image.png', array("alt" => "Alt Message", class => "myclass"));
</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_meta">meta($name, $content = '', $type = 'name')</h4>
<p>The <strong>meta</strong> method returns meta tag or tags if multi-level array is supplied.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$name</kbd></th>
<td><i>required</i></td>
<td>Can be array containing single or multiple meta parameters or can be name/http-equiv value.</td>
</tr>
<tr>
<th><kbd>$content</kbd></th>
<td><i>required</i></td>
<td>If no array is supplied on the $name parameter, $content equals to the meta attribute content's value.</td>
</tr>
<tr>
<th><kbd>$type</kbd></th>
<td><strong>'name'</strong></td>
<td>If no value is supplied will default to name. Can be name or http-equiv.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated meta tags.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <meta name="description" content="Meta Example!" />
echo Html::meta('description', 'Meta Example!');
//returns <meta name="robots" content="no-cache" />
echo Html::meta('robots', 'no-cache');
$meta = array(
array('name' => 'robots', 'content' => 'no-cache'),
array('name' => 'description', 'content' => 'Meta Example'),
array('name' => 'keywords', 'content' => 'fuel, rocks'),
);
//returns <meta name="robots" content="no-cache" />
//returns <meta name="description" content="Meta Example!" />
//returns <meta name="keywords" content="fuel, rocks" />
echo Html::meta($meta);</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_doctype">doctype($type = 'xhtml1-trans')</h4>
<p>The <strong>doctype</strong> method returns a correctly formated doctype tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$type</kbd></th>
<td>'xhtml1-trans'</td>
<td>Type of html doctype tag to be outputted.<br />Accepted Values: <kbd>xhtml11</kbd>, <kbd>xhtml1-strict</kbd>, <kbd>xhtml1-trans</kbd>, <kbd>xhtml1-frame</kbd>, <kbd>html5</kbd>, <kbd>html4-strict</kbd>, <kbd>html4-trans</kbd>, <kbd>html4-frame</kbd></td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated doctype tag.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns the XHTML1 Transitional doctype tag.
echo Html::doctype();
//returns <!DOCTYPE html>
echo Html::doctype('html5');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_header">header($content, $attr = false)</h4>
<p>The <strong>header</strong> method returns a div tag with the id of header. When used along with the Html::doctype('html5') method will default to a header tag.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$content</kbd></th>
<td><i>required</i></td>
<td>Content to be found between the tags.</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>array()</strong></td>
<td>Array of attributes to be applied to the tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated header or div tag.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//if html5 is set returns <header>Oh Yeah baby.</header>
echo Html::header('Oh Yeah baby');
//without html5 returns <div id="header">Oh Yeah baby.</div>
echo Html::header('Oh Yeah baby');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_audio">audio($src, $attr = false)</h4>
<p>The <strong>audio</strong> method requires you to set html5 as the doctype in order to be used.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$src</kbd></th>
<td><i>required</i></td>
<td>Location of the source file or array containing multiple locations.</td>
</tr>
<tr>
<th><kbd>$attr</kbd></th>
<td><strong>false</strong></td>
<td>Array of attributes to be applied to the audio tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated audio tag with its sources.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>//returns <audio><source src="../sounds/beep.mp3" /></audio>
echo Html::audio('../sounds/beep.mp3');
//returns <audio><source src="../sounds/beep.mp3" /><source src="../sounds/frog.mp4" /></audio>
echo Html::audio(array('../sounds/beep.mp3','../sounds/frog.mp4'));</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_ul">ul($list, $style = false)</h4>
<p>The <strong>ul</strong> method returns correctly formated single or multi-level unordered list.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$list</kbd></th>
<td><i>required</i></td>
<td>Array containing single or multi-level items to be outputted as list items.</td>
</tr>
<tr>
<th><kbd>$style</kbd></th>
<td><strong>false</strong></td>
<td>Array of attributes to be applied to the ul tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated list.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>/* returns
<ul id="todo" class="pending">
<li>red</li>
<li>blue</li>
<li>green</li>
<li>yellow</li>
</ul>
*/
$items = array('red', 'blue', 'green', 'yellow');
$attr = array('id' => 'todo','class' => 'pending');
echo Html::ul($items, $attr);
/* returns
<ul class="order">
<li>colors
<ul>
<li>blue</li>
<li>red</li>
<li>green</li>
</ul>
</li>
<li>sky</li>
<li>tools
<ul>
<li>screwdriver</li>
<li>hammer</li>
</ul>
</li>
</ul>
*/
$items = array(
'colors' => array('blue', 'red', 'green'),
'sky',
'tools' => array('screw driver','hammer')
);
$attr = array('class' => 'order');
echo Html::ul($items, $attr);</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 id="method_ol">ol($list, $style = false)</h4>
<p>The <strong>ol</strong> method returns correctly formated single or multi-level ordered list.</p>
<table class="method">
<tbody>
<tr>
<th>Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$list</kbd></th>
<td><i>required</i></td>
<td>Array containing single or multi-level items to be outputed as list items.</td>
</tr>
<tr>
<th><kbd>$style</kbd></th>
<td><strong>false</strong></td>
<td>(Optional) Array of attributes to be applied to the ol tag.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>String containing the correctly formated list.</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>/* returns
<ol id="todo" class="pending">
<li>red</li>
<li>blue</li>
<li>green</li>
<li>yellow</li>
</ol>
*/
$items = array('red', 'blue', 'green', 'yellow');
$attr = array('id' => 'todo','class' => 'pending');
echo Html::ol($items, $attr);
/* returns
<ol class="order">
<li>colors
<ol>
<li>blue</li>
<li>red</li>
<li>green</li>
</ol>
</li>
<li>sky</li>
<li>tools
<ol>
<li>screwdriver</li>
<li>hammer</li>
</ol>
</li>
</ol>
*/
$items = array(
'colors' => array('blue', 'red', 'green'),
'sky',
'tools' => array('screw driver','hammer'));
$attr = array('class' => 'order');
echo Html::ol($items, $attr);</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
</section>
<section id="footer">
<p>
<a href="http://fuelphp.com">Fuel</a> is released under the MIT license.<br />
© 2010 - 2011 Fuel Development Team
</p>
</section>
</body>
</html>