I try to pass an array element in include's var.
But I still have this error :
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/home/technique/www/site/tpl/home.html" on line 6 "{include file='include/article-latest.html' class='col-50' title=$article.TITLE tag=ARTICLE_CATEGORY.$article.CATEGORY img=$article.THUMBNAIL view='3526' share='564'}" - Unexpected ".", expected one of: "}" <-- thrown in /home/technique/www/common/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 6
My code :
{foreach $latest_article.0 as $article}
{include file='include/article-latest.html' class='col-50' title=$article.TITLE tag=ARTICLE_CATEGORY.$article.CATEGORY img=$article.THUMBNAIL view='3526' share='564'}
{/foreach}
Apparently, the problem is using the constant ARTICLE_CATEGORY. It seem like the php constant isn't interpreted by smarty...