To participate you must create an account on apostrophenow.org. If you have already done so, click Login.
Ticket #508: slideshowTemplatePatch.diff
|
File slideshowTemplatePatch.diff, 1.7 KB
(added by anonymous, 22 months ago)
|
|
Patch that adds a 'slideshowTemplate' option to a slideshow slot (different than an itemTemplate)
|
-
|
|
|
|
| 45 | 45 | $this->items = array(); |
| 46 | 46 | $this->itemIds = array(); |
| 47 | 47 | } |
| | 48 | |
| | 49 | $this->options['slideshowTemplate'] = $this->getOption('slideshowTemplate', 'slideshow'); |
| 48 | 50 | } |
| 49 | 51 | |
| 50 | 52 | public function executeSlideshow() |
| 51 | 53 | { |
| | 54 | $this->initOptions(); |
| | 55 | } |
| | 56 | |
| | 57 | protected function initOptions() |
| | 58 | { |
| 52 | 59 | $this->options['width'] = $this->getOption('width', 440); |
| 53 | 60 | $this->options['height'] = $this->getOption('height', 330); |
| 54 | 61 | $this->options['resizeType'] = $this->getOption('resizeType', 's'); |
| … |
… |
|
| 61 | 68 | $this->options['transition'] = $this->getOption('transition'); |
| 62 | 69 | $this->options['position'] = $this->getOption('position', false); |
| 63 | 70 | $this->options['itemTemplate'] = $this->getOption('itemTemplate', 'slideshowItem'); |
| 64 | | } |
| | 71 | } |
| 65 | 72 | } |
-
|
|
|
|
| 39 | 39 | <?php endif ?> |
| 40 | 40 | |
| 41 | 41 | <?php if (count($items)): ?> |
| 42 | | <?php include_component('aSlideshowSlot', 'slideshow', array('items' => $items, 'id' => $id, 'options' => $options)) ?> |
| | 42 | <?php include_component('aSlideshowSlot', $options['slideshowTemplate'], array('items' => $items, 'id' => $id, 'options' => $options)) ?> |
| 43 | 43 | <?php else: ?> |
| 44 | 44 | |
| 45 | 45 | <?php if (isset($options['singleton']) != true): ?> |
Download in other formats: