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)

  • lib/action/BaseaSlideshowSlotComponents.class.php

     
    4545      $this->items = array(); 
    4646      $this->itemIds = array(); 
    4747    } 
     48     
     49    $this->options['slideshowTemplate'] = $this->getOption('slideshowTemplate', 'slideshow'); 
    4850  } 
    4951 
    5052        public function executeSlideshow() 
    5153        { 
     54    $this->initOptions(); 
     55        } 
     56         
     57  protected function initOptions() 
     58  { 
    5259    $this->options['width'] = $this->getOption('width', 440); 
    5360    $this->options['height'] = $this->getOption('height', 330); 
    5461    $this->options['resizeType'] = $this->getOption('resizeType', 's'); 
     
    6168    $this->options['transition'] = $this->getOption('transition'); 
    6269    $this->options['position'] = $this->getOption('position', false); 
    6370                $this->options['itemTemplate'] = $this->getOption('itemTemplate', 'slideshowItem'); 
    64         } 
     71  } 
    6572} 
  • modules/aSlideshowSlot/templates/_normalView.php

     
    3939<?php endif ?> 
    4040 
    4141<?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)) ?> 
    4343<?php else: ?> 
    4444 
    4545        <?php if (isset($options['singleton']) != true): ?>