* @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ * */ //action $action = "expages/addfront"; //grab the required entity $page_contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'front', 'limit' => 1)); if($page_contents){ foreach($page_contents as $pc){ $description_right = $pc->description; $description_left = $pc->title; $guid = $pc->guid; } }else { $tags = ""; $description = ""; } // set the required form variables $input_area_left = elgg_view('input/longtext', array('internalname' => 'front_left', 'value' => $description_left)); $input_area_right = elgg_view('input/longtext', array('internalname' => 'front_right', 'value' => $description_right)); $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); $hidden_guid = elgg_view('input/hidden', array('internalname' => 'front_guid', 'value' => $guid)); $lefthand = elgg_echo("expages:lefthand"); $righthand = elgg_echo("expages:righthand"); //preview link // echo "
" . elgg_echo('expages:preview') . "
"; //construct the form $form_body = <<$lefthand

$input_area_left


$righthand

$input_area_right

$hidden_guid
$submit_input EOT; ?> "{$vars['url']}action/$action", 'body' => $form_body)); ?>