Open venomdev opened 3 years ago
I'm not sure if it is not too late, but if you still have this issue if will be more clear I think we can find solution ;) if you want an article pop up in twig you should send the date to twig first
like
defined('_JEXEC') or die;
$data = array(
'type' => 'category',
'params' => $this->params,
'items' => $this->leading,
'pagination_html' => $this->pagination->getPagesLinks(),
'current_page' => $this->params->get('catPagination'),
'total_pages' => $this->pagination->getPagesCounter()
);
JLoader::import('twig.library');
echo Twig::render('@template/com_k2/category.html.twig', $data);
in twig you do something like {{ current_page }} ...
God bless Twig!
Is it possible to include an article into a template and also have the article scanned for any twig fields?
Or is it possible to render from a string?