1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/11201] Split template file into multiple files

PHPBB3-11201
This commit is contained in:
Joas Schilling
2014-02-02 16:20:02 +01:00
parent cacd43bfbd
commit cbad102f88
8 changed files with 36 additions and 33 deletions

View File

@@ -60,6 +60,14 @@ abstract class type_base implements type_interface
return 'profilefields.type.' . $this->get_name_short();
}
/**
* {@inheritDoc}
*/
public function get_template_filename()
{
return 'profilefields/' . $this->get_name_short() . '.html';
}
/**
* {@inheritDoc}
*/
@@ -153,7 +161,7 @@ abstract class type_base implements type_interface
// set template filename
$this->template->set_filenames(array(
'cp_' . $this->get_name_short() . '_body' => 'custom_profile_fields.html',
'cp_body' => $this->get_template_filename(),
));
// empty previously filled blockvars
@@ -162,6 +170,6 @@ abstract class type_base implements type_interface
// Assign template variables
$this->generate_field($profile_row, $preview_options);
return $this->template->assign_display('cp_' . $this->get_name_short() . '_body');
return $this->template->assign_display('cp_body');
}
}