php - October CMS | display images on reordering lists -


there way turn on reorder functionality on list controller , re-order list items name example...

but there way display images instead of text on reorder list?

enter image description here

what have now:

config_reorder.yaml

title: 'configurar ordem' azuref: ref azuimg: image modelclass: frama\azulejos\models\azulejo toolbar: buttons: reorder_toolbar 

reordercontroller.php

... public function __construct($controller) {     ...      $this->azuimg = $this->getconfig('azuimg', $this->azuimg);      ...  } ... 

and result of course text... , don't know that... need access path or (better) getthumb

enter image description here


edit

ok can path that, transforming sting:

json_decode($this->reordergetrecordimg($record))->path 

but how make thumb work?

solution

well solution easy ***k :)

modules/backend/behaviors/rendercontroller/partials/_records.htm

<?php foreach ($records $record): ?>     <!-- ... -->      <img src="<?= $record->image->getthumb(50,'auto',['mode' => 'landscape']) ?>" alt="">       <!-- ... --> <?php endforeach ?> 

or:

modules/backend/behaviors/rendercontroller/partials/_records.htm

<?php foreach ($records $record): ?>     <!-- ... -->      <img src="<?= $this->reordergetrecordimg($record) ?>" alt="">       <!-- ... --> <?php endforeach ?> 

reordercontroller.php

... public function __construct($controller) {     ...      $this->azuimg = $this->getconfig('azuimg', $this->azuimg);      ...  } ... public function reordergetrecordimg($record) {     return $record->image->getthumb(50,'auto',['mode' => 'landscape']); } ... 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -