1
|
<?php
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
?>
|
11
|
<div<?php print $attributes; ?>>
|
12
|
<?php if($indicators && ($item_length = count($items))): ?>
|
13
|
<ol class="carousel-indicators">
|
14
|
<?php for ($i = 0; $i < $item_length; $i++): ?>
|
15
|
<li data-target="<?php print $target; ?>" data-slide-to="<?php print $i; ?>"<?php print ($start_index === $i ? ' class="active"' : ''); ?>></li>
|
16
|
<?php endfor; ?>
|
17
|
</ol>
|
18
|
<?php endif; ?>
|
19
|
<div class="carousel-inner">
|
20
|
<?php foreach ($items as $i => $item): ?>
|
21
|
<div class="item<?php print ($start_index === $i ? ' active' : ''); ?>">
|
22
|
<?php print render($item['image']); ?>
|
23
|
<?php if ($item['title'] || $item['description']): ?>
|
24
|
<div class="carousel-caption">
|
25
|
<?php if ($item['title']): ?>
|
26
|
<h3><?php print $item['title']; ?></h3>
|
27
|
<?php endif; ?>
|
28
|
<?php if ($item['description']): ?>
|
29
|
<p><?php print $item['description']; ?></p>
|
30
|
<?php endif; ?>
|
31
|
</div>
|
32
|
<?php endif; ?>
|
33
|
</div>
|
34
|
<?php endforeach; ?>
|
35
|
</div>
|
36
|
<?php if($controls): ?>
|
37
|
<a class="left carousel-control" href="<?php print $target; ?>" role="button" data-slide="prev">
|
38
|
<span class="glyphicon glyphicon-chevron-left"></span>
|
39
|
</a>
|
40
|
<a class="right carousel-control" href="<?php print $target; ?>" role="button" data-slide="next">
|
41
|
<span class="glyphicon glyphicon-chevron-right"></span>
|
42
|
</a>
|
43
|
<?php endif; ?>
|
44
|
</div>
|