Wiki ⇒ Dragonfly Themes ⇒ Assigning variable to theme templates
Glossary
The Project
Install
Dragonfly admin interface
Dragonfly public view
Dragonfly Themes
Build local server
Running Dragonfly CVS
Tips and Tricks
Rules & Regulations
v9 Developer's Manual
v10 Developer's manual
|
6.4: Assigning variable to theme templates  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');
|
| |
Updated: Wednesday, September 07, 2005 (16:00:10) by tuta Created: Tuesday, September 06, 2005 (04:59:53) by akamu |

|