Commit 274c7c2d authored by Robert Lyon's avatar Robert Lyon
Browse files

Fetch template html via some json files in a better way (Bug #1321053)



Change-Id: I13a7a9a95da0b46a6b29862e8ad14e3e66bbb4f6
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 473b4f2c
......@@ -39,10 +39,7 @@ if ($shownav) {
}
}
ob_start();
$smarty->display('collection/viewcontent.tpl');
$html = ob_get_contents();
ob_end_clean();
$html = $smarty->fetch('collection/viewcontent.tpl');
json_reply(false, array(
'message' => null,
......
......@@ -21,10 +21,7 @@ $group = group_get_groupinfo_data($group);
$smarty = smarty_core();
$smarty->assign('group', $group);
ob_start();
$smarty->display('group/groupdata.tpl');
$html = ob_get_contents();
ob_end_clean();
$html = $smarty->fetch('group/groupdata.tpl');
json_reply(false, array(
'message' => null,
......
......@@ -19,10 +19,7 @@ $user->introduction = get_field('artefact', 'title', 'artefacttype', 'introducti
$smarty = smarty_core();
$smarty->assign('user', $user);
ob_start();
$smarty->display('user/simpleuser.tpl');
$html = ob_get_contents();
ob_end_clean();
$html = $smarty->fetch('user/simpleuser.tpl');
json_reply(false, array(
'message' => null,
......
......@@ -26,10 +26,7 @@ $smarty->assign('ownername', $view->formatted_owner());
$smarty->assign('viewdescription', $view->get('description'));
$smarty->assign('viewcontent', $view->build_rows());
$smarty->assign('tags', $view->get('tags'));
ob_start();
$smarty->display('view/viewcontent.tpl');
$html = ob_get_contents();
ob_end_clean();
$html = $smarty->fetch('view/viewcontent.tpl');
json_reply(false, array(
'message' => null,
......
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