Commit 949c2d14 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

changed one blog field blocktype so it gets the title from the field selected

parent 99974b6e
......@@ -40,6 +40,21 @@ class PluginBlocktypeResumefield extends PluginBlocktype {
return array('resume');
}
/**
* Optional method. If exists, allows this class to decide the title for
* all blockinstances of this type
*/
public static function get_instance_title(BlockInstance $bi) {
$configdata = $bi->get('configdata');
if (!empty($configdata['artefactid'])) {
require_once(get_config('docroot') . 'artefact/lib.php');
$resumefield = artefact_instance_from_id($configdata['artefactid']);
return $resumefield->get('title');
}
return '';
}
public static function render_instance(BlockInstance $instance) {
require_once(get_config('docroot') . 'artefact/lib.php');
$smarty = smarty_core();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment