Wiki ⇒ v9 Developer's Manual ⇒ Dragonfly Themes ⇒ Assigning variable to theme templates ⇒ CPG Dragonfly™ CMS
Wikiv9 Developer's ManualDragonfly Themes ⇒ Assigning variable to theme templates

13.7. 4: Assigning variable to theme templates Parent


The module assigns variables to an array that is assigned to the template class.

$cpgtpl->assign_block_vars('newsempty', array(
'S_NOTOPIC' => _NOINFO4TOPIC,
'S_GONEWS' => _GOTONEWSINDEX,
'S_SELECT' => _SELECTNEWTOPIC,
'S_SITENAME' => $sitename,
'U_NEWSINDEX' => getlink('News'),
'U_TOPICS' => getlink('Topics')
)

Then the template is used by the module to write the page.

$cpgtpl->set_filenames(array('body' => 'news/index.html'));
$cpgtpl->display('body');


Created: Tuesday, September 06, 2005 (04:59:53) by akamu
Updated: Wednesday, September 07, 2005 (16:00:10) by tuta