Jaxel
Well-known member
This is what I am doing:
I am then trying to access the `$catlinks` in my template on a per `$article` basis:
Unfortunately, this is giving me an error.
Code:
$articles = $entries->fetch();
$entriesC = $this->getCatLinkRepo()->findCatLink()
->where('thread_id', array_keys($articles->toArray()))
->fetch();
$catlinks = [];
foreach ($entriesC AS $catlink)
{
$catlinks[$catlink->thread_id][$catlink->category_id] = $catlink;
}
$viewParams = [
'articles' => $articles,
'catlinks' => $catlinks,
];
I am then trying to access the `$catlinks` in my template on a per `$article` basis:
Code:
<xf:foreach loop="$catlinks.{$article.thread_id}" value="$catlink">
Unfortunately, this is giving me an error.