getSubtype() == 'widget') { $handler = $vars['entity']->handler; $title = $widgettypes[$vars['entity']->handler]->name; if (!$title) { $title = $handler; } } else { $handler = "error"; $title = elgg_echo("error"); } $title = "Widget Title"; $display_view = "widgets/$handler/view"; $can_edit = $widget->canEdit(); ?>