Templates: Difference between revisions

m resize image
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
Line 58: Line 58:


Something like this little one-liner can help to generate your Smarty captures if you have a long list of custom variables
Something like this little one-liner can help to generate your Smarty captures if you have a long list of custom variables
<source lang="php">
<syntaxhighlight lang="php">
php -r 'include ("/var/www/equality-tech.com/www/drupal/sites/all/modules/custom/eqt/eqt.module"); $stack="stats"; $vars = getHaystack($stack); foreach ($vars as $k=>$v) {print "{capture assign=$k}{{$stack}.$k}{/capture}\n";};';
php -r 'include ("/var/www/equality-tech.com/www/drupal/sites/all/modules/custom/eqt/eqt.module"); $stack="stats"; $vars = getHaystack($stack); foreach ($vars as $k=>$v) {print "{capture assign=$k}{{$stack}.$k}{/capture}\n";};';
</source>
</syntaxhighlight>