SOLVED Calc element in repeat group

Hello,
sorry for my stupid question. But I have not found or found the solution that must exist on the forum.
I'm trying to display an image through the calc element in a repeat group.
here my request:

$articleId = '{achat_goodies___article_raw}';
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->select('d_signation')->from('goodies')->where('id = ' . $myDb->quote($articleId));
$myDb->setQuery($myQuery);
$path = $myDb->loadResult();
return '<img src="' . $path . '" alt =" " />';

Calc in repeat group is well checked ...

Someone could re/give me the way to ?

Thanks
 
You are getting the article id from your "main" table/group, not from the repeat group. That way you'll get the same image for every repeat row.

For checking the actual query result, you can add:

var_dump($path);
exit;

after the line:
$path = $myDb->loadResult();

and see what you get.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top