Inject variables only in teasers (template suggestions) How could I detect if node type is article (in template.php) but process variables only for teaser of article, not article i full mode. (I have template suggestions so i have node--article-teaser.tpl.php). Like:

if ($node-&gt;type == 'article' and inject only if article-teaser.tpl.php)


Thanks!
In a preprocess/process function for the node template file, you just need to check the following variables:


$variables['teaser'] must be TRUE
$variables['node']-&gt;type must be 'article'


$variables is the parameter passed to preprocess/process functions.