aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/start.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 00:32:08 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 00:32:08 +0000
commite3ae2734233fd11e5fedd7cd2fc3f87cff79dc20 (patch)
tree01255e78ad74c0e92200cd3846bb2e5df68b6d53 /mod/developers/start.php
parent8f5c54b7acfd027bf1f95b70931a3f6ef61c8eb6 (diff)
downloadelgg-e3ae2734233fd11e5fedd7cd2fc3f87cff79dc20.tar.gz
elgg-e3ae2734233fd11e5fedd7cd2fc3f87cff79dc20.tar.bz2
theme_preview is using more familiar/correct page handling practices
git-svn-id: http://code.elgg.org/elgg/trunk@8300 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/developers/start.php')
-rw-r--r--mod/developers/start.php27
1 files changed, 20 insertions, 7 deletions
diff --git a/mod/developers/start.php b/mod/developers/start.php
index e6f4d46b5..9e1d02361 100644
--- a/mod/developers/start.php
+++ b/mod/developers/start.php
@@ -31,16 +31,29 @@ function developers_setup_menu() {
*/
function developers_theme_preview_controller($page) {
if (!isset($page[0])) {
- $page[0] = 'index';
+ forward('pg/theme_preview/general');
}
- $pages = array('general', 'nav', 'forms', 'objects', 'grid', 'widgets', 'icons');
+ $pages = array(
+ 'general',
+ 'navigation',
+ 'forms',
+ 'objects',
+ 'grid',
+ 'widgets',
+ 'icons',
+ );
+
+ foreach ($pages as $page_name) {
+ elgg_register_menu_item('page', array(
+ 'name' => $page_name,
+ 'title' => elgg_echo("theme_preview:$page_name"),
+ 'url' => "pg/theme_preview/$page_name",
+ ));
+ }
$title = elgg_echo("theme_preview:{$page[0]}");
- $page = elgg_view("theme_preview/{$page[0]}", array(
- 'pages' => $pages,
- 'page' => $page[0],
- ));
+ $body = elgg_view("theme_preview/{$page[0]}");
- echo elgg_view_page($title, $page, 'theme_preview');
+ echo elgg_view_page($title, $body, 'theme_preview');
}