diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-03 02:55:03 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-03 02:55:03 +0000 |
commit | ab10e3ac5a0b5bbc6cd08c7647a0123364db72f3 (patch) | |
tree | d115661a0501d359d9e91d9fa110c81723ee4f9b /views/default/page_elements/main_nav.php | |
parent | 6b7325c3138ea5a3f20f2d95dce05242b0cdb653 (diff) | |
download | elgg-ab10e3ac5a0b5bbc6cd08c7647a0123364db72f3.tar.gz elgg-ab10e3ac5a0b5bbc6cd08c7647a0123364db72f3.tar.bz2 |
preview of what the main content area looks like with a module approach
git-svn-id: http://code.elgg.org/elgg/trunk@7509 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements/main_nav.php')
-rw-r--r-- | views/default/page_elements/main_nav.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/views/default/page_elements/main_nav.php b/views/default/page_elements/main_nav.php new file mode 100644 index 000000000..0c267b3f2 --- /dev/null +++ b/views/default/page_elements/main_nav.php @@ -0,0 +1,32 @@ +<?php + +// page handler type +$type = $vars['type']; + +$username = get_loggedin_user()->username; + +// so we know if the user is looking at their own, everyone's or all friends +$filter_context = $vars['context']; + +// generate a list of default tabs +$default_tabs = array( + 'all' => array( + 'title' => elgg_echo('all'), + 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$type/", + 'selected' => ($filter_context == 'everyone'), + ), + 'mine' => array( + 'title' => elgg_echo('mine'), + 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$type/$username", + 'selected' => ($filter_context == 'mine'), + ), + 'friend' => array( + 'title' => elgg_echo('friends'), + 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$type/$username/friends", + 'selected' => ($filter_context == 'friends'), + ), +); + +// determine if using default or overwritten tabs +$tabs = elgg_get_array_value('tabs', $vars, $default_tabs); +echo elgg_view('navigation/tabs', array('tabs' => $tabs));
\ No newline at end of file |