One icon in the list to view more data

enrb

Member
Good morning,

I have a list with a non-repeating group linked to a repeating group.

I want to show an element of the repeated group in the list, but instead of showing all the items, I would like to show only one icon (only one for all the items), is it possible?

At the moment if I replace the text with the icon, in the list it shows me as many icons as there are items ...
 
You can add something like this in your Fabrik list's custom css file:
Code:
td.repeat-icon-trunc > ul.fabrikRepeatData li, span.repeat-icon-trunc > ul.fabrikRepeatData li  {
    display:none;
}

td.repeat-icon-trunc > ul.fabrikRepeatData li:nth-child(1), span.repeat-icon-trunc > ul.fabrikRepeatData li:nth-child(1) {
    display: list-item;
    border-bottom: 0px!important;
}

td.repeat-icon-trunc > a > img, span.repeat-icon-trunc > a > img {
    display: inline!important;
}
Last rule might not be needed depending how your other css looks like.

And now, in the element settings, List view settings -> CSS, add "repeat-icon-trunc" in the "Cell class" field.

And if you need a tooltip data from all the repeat rows, you can add evel'ed tooltip to the element and query the data from all the related rows from repeat table.
 
What do you want to do with this icon?
If you want to show the repeatgroup data "on click": do you know list's "Related data" feature?
 
Hello, I know the "Related data" function, but that's not what I need.

I'm just trying to use an icon in the list where, by hovering over it with the mouse, you can see in the popup that appears, the list of all the repeated data.

I tried with a query in the calc element, but it only shows me the first element it finds and not all of them.

I write below the query I use, do you have any suggestions to give me to ensure that I can view all the data?

Code:
$db = FabrikWorker::getDbo();
$query = $db->getQuery(true);

$query->clear()
  ->select('dkgest_tavole_17_repeat.coddeltaassiemi')
  ->from($db->quoteName('dkgest_tavole'))
  ->innerjoin($db->quoteName('dkgest_tavole_17_repeat') . ' ON ' . $db->quoteName('dkgest_tavole.id') . ' = ' . $db->quoteName('dkgest_tavole_17_repeat.parent_id'))
  ->where(array(
    $db->quoteName('dkgest_tavole.id') . ' = ' . $db->quote('{dkgest_tavole_17_repeat___parent_id}')
  ));

$db->setQuery($query);
$count = $db->loadResult();
return $count;
 
Something like this should do:
Code:
$mydb = JFactory::getDBO();
$mydb->setQuery("SELECT a.coddeltaassiemi FROM dkgest_tavole_17_repeat AS a LEFT JOIN dkgest_tavole AS b ON a.parent_id = b.id WHERE a.parent_id = '{rowid}' ");
$rows = $mydb->loadObjectList();

$myhtml = "";
foreach ($rows as $row) {
   $myhtml .= $row->coddeltaassiemi."<br>";
}
return $myhtml;
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top