Элемент делался из стандартного text для красивого вывода видео из контакта через фрейм.
Ссылка к фрейму выглядит так:
<div class="button-ani" id="VIDEOID"><a target="my-frame" href="ССЫЛКА">NUMBER</a></div>
В элементе 3 поля: videoid (для запоминания нажатой кнопки), number (текст на кнопке) и value (код самого видео). Проблема в том, что элемент не выводит значения повторяемых полей, выводит только первое
Должно быть как на нижних кнопках, а получается только одна
defined('_JEXEC') or die('Restricted access'); App::getInstance('zoo')->loader->register('ElementRepeatable', 'elements:repeatable/repeatable.php'); class ElementVideo extends ElementRepeatable implements iRepeatSubmittable { protected function _hasValue($params = array()) { $videoid = $this->get('videoid', $this->config->get('default')); $number = $this->get('number', $this->config->get('default')); $value = $this->get('value', $this->config->get('default')); return !empty($videoid) || !empty($number) || !empty($value) || $value === '0'; } protected function _getSearchData() { return $this->get('videoid', $this->config->get('default')).','.$this->get('number', $this->config->get('default')).','.$this->get('value', $this->config->get('default')); } protected function _edit($params = array()) { echo $this->app->html->_('control.text', $this->getControlName('videoid'), $this->get('videoid', $this->config->get('default')), 'size="60" maxlength="255"'); echo $this->app->html->_('control.text', $this->getControlName('number'), $this->get('number', $this->config->get('default')), 'size="60" maxlength="255"'); echo $this->app->html->_('control.text', $this->getControlName('value'), $this->get('value', $this->config->get('default')), 'size="60" maxlength="255"'); } public function render($params = array()) { $string = $this->get('value'); ?><div class="button-ani" id="<?echo $this->get('videoid');?>"><a target="my-frame" href="<?echo substr($string, 13, -10);?>"><?echo $this->get('number');?></a></div><? } public function _renderSubmission($params = array()) { return $this->_edit(); } }?>