use eZTemplateFactory\Builder; $builder = new Builder(); $template = $builder->getTemplate('page.tpl');
$template->title = 'My Page Title'; $template->content = 'My Page Content'; $template->assign('footer', 'My Page Footer');This code assigns values to the template using property and method access. Package library: The eZTemplate factory is a part of the eZ Publish package library.