Best Answer SmetDenis , 12 March 2017 - 22:52
Можно проверять число, которое вернется в $this->key()
т.е переопределить рендеринг
public function render($params = array()) {
$params = $this->app->data->create($params);
$result = array();
foreach ($this as $self) {
if ($this->key() <= 2) {
$result[] = $this->_render($params);
}
}
return $this->app->element->applySeparators($params->get('separated_by'), $result);
}
Go to the full post


This topic is locked








