$info) {
$menu_sorted[$info->name] = $info->value->url;
}
ksort($menu_sorted);
$pulldown_values = array_flip($menu_sorted);
$pulldown_values[''] = elgg_echo('none');
echo elgg_view_title(elgg_echo('admin:menu_items'));
echo elgg_view('output/longtext', array('value' => elgg_echo("admin:menu_items:description")));
$form_body = '';
// @todo Could probably make this number configurable
for ($i=0; $i<6; $i++) {
if (array_key_exists($i, $featured_urls)) {
$current_value = $featured_urls[$i]->value->url;
} else {
$current_value = '';
}
$form_body .= elgg_view('input/pulldown', array(
'options_values' => $pulldown_values,
'internalname' => 'featured_urls[]',
'value' => $current_value
));
}
$form_body .= '
';
// add arbitrary links
$form_body .= elgg_view_title(elgg_echo('admin:add_menu_item'));
$form_body .= elgg_view('output/longtext', array('value' => elgg_echo("admin:add_menu_item:description")));
$custom_items = get_config('menu_items_custom_items');
$name_str = elgg_echo('name');
$url_str = elgg_echo('admin:plugins:label:website');
$form_body .= '