Problem/Motivation

Thanks for this module, it's very valuable. I've gotten ItemList working with a few views that render content, but for one view I need to use fields because of it needs a combined field search filter.

Is there a way to have the itemListElement simply show a field for each row of the result?

Maybe I'm missing something, but it seems that I can show an argument - but I haven't found a way to display any values from the results of the query.

Proposed resolution

I would appreciate it if I could set set what goes in the itemlist from each row of the result.

CommentFileSizeAuthor
#3 3588428-2.patch.txt737 bytesdereks
#2 3588428.patch579 bytesdereks

Comments

dereks created an issue. See original summary.

dereks’s picture

StatusFileSize
new579 bytes

I got this working for me, but I'm not sure why it wasn't working in the first place.

If I have a view of fields that includes a rendered entity, the static function getEntityFromRow returns null. But if I grab the entity from the row, it does work.

        $entity = static::getEntityFromRow($item);  //  <- this is returning null
        if (!$entity) {
          $entity = $item->_entity; // <-while this successfully gets the entity.
          if (!$entity) {
            return '';
          }
        }

The static function seems like it should return the correct value.

I made a patch for myself, so I'm all set but I thought I'd pass on the information.

dereks’s picture

StatusFileSize
new737 bytes

Oops - wrong file paths in the patch. Here's the correct one.