root/trunk/plugins/contents/views/elements/items/featured.ctp
| 406 | 474 | ||
|---|---|---|---|
1 | <?php | 1 | <?php |
2 | $limit = 3; | 2 | if (!isset($limit)) { |
3 | $limit = 3; | ||
4 | } | ||
5 | if (!isset($description)) { | ||
6 | $description = false; | ||
7 | } | ||
3 | $channel = null; | 8 | $channel = null; |
4 | $items = $this->requestAction(array( | 9 | $items = $this->requestAction(array( |
5 | 'plugin' => 'contents', | 10 | 'plugin' => 'contents', |
... | ... | ||
11 | ?> | 16 | ?> |
12 | 17 | ||
13 | <div id="featured_items" class="clearfix"> | 18 | <div id="featured_items" class="clearfix"> |
14 | <ul> | ||
15 | <?php foreach ($items as $item): ?> | 19 | <?php foreach ($items as $item): ?> |
16 | <li> | 20 | <article> |
17 | <p class="clearfix"><?php if ($item['Item']['image']): ?> | 21 | <?php if ($item['Item']['image']): ?> |
18 | <?php | 22 | <?php |
19 | echo $theme->thumbnail($item['Item']['image'], array('class' => 'top left')); | 23 | echo $theme->thumbnail($item['Item']['image'], array('class' => 'top left')); |
20 | ?> | 24 | ?> |
21 | <?php endif; ?> | 25 | <?php endif; ?> |
22 | <?php echo $theme->itemLink($item['Item']['title'], $item['Item']['slug']); ?> | 26 | <h1><?php echo $theme->itemLink($item['Item']['title'], $item['Item']['slug']); ?></h1> |
23 | </p> | 27 | <?php if ($description): ?> |
24 | </li> | 28 | <p><?php echo $item['Item']['description'] ?></p> |
29 | <?php endif ?> | ||
30 | </article> | ||
25 | <?php endforeach ?> | 31 | <?php endforeach ?> |
26 | </ul> | ||
27 | </div> | 32 | </div> |
Download diff