aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 18:19:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 18:19:38 +0000
commitf2c8ab97778a4cc8c649f2e213d0eee7499357b8 (patch)
tree688f2dd390c60764c8fea582634ae9c9cb4d2094 /mod/sitepages
parentfc0a25bc8f744a4e1b738ed7779726d1230aaa3f (diff)
downloadelgg-f2c8ab97778a4cc8c649f2e213d0eee7499357b8.tar.gz
elgg-f2c8ab97778a4cc8c649f2e213d0eee7499357b8.tar.bz2
cleaning up the page footer - still need to add css for footer menu
git-svn-id: http://code.elgg.org/elgg/trunk@7685 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages')
-rw-r--r--mod/sitepages/start.php14
-rw-r--r--mod/sitepages/views/default/sitepages/footer_menu.php13
2 files changed, 13 insertions, 14 deletions
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
index 844187503..08c01d6c7 100644
--- a/mod/sitepages/start.php
+++ b/mod/sitepages/start.php
@@ -24,6 +24,8 @@ function sitepages_init() {
// Extend CSS
elgg_extend_view('css/screen', 'sitepages/css');
+ sitepages_setup_footer_menu();
+
// register our subtype
run_function_once('sitepages_runonce');
@@ -33,7 +35,6 @@ function sitepages_init() {
// Register a URL handler for external pages
register_entity_url_handler('sitepages_url', 'object', 'sitepages');
- elgg_extend_view('footer/links', 'sitepages/footer_menu');
elgg_extend_view('html_head/extend', 'sitepages/metatags');
// Replace the default index page if user has requested and the site is not running walled garden
@@ -137,6 +138,17 @@ function sitepages_page_handler($page) {
echo elgg_view_page($title, $content);
}
+/**
+ * Setup the links to site pages
+ */
+function sitepages_setup_footer_menu() {
+ $pages = array('about', 'terms', 'privacy');
+ foreach ($pages as $page) {
+ $url = "pg/sitepages/read/$page";
+ $item = new ElggMenuItem($page, elgg_echo("sitepages:$page"), $url);
+ elgg_register_menu_item('footer', $item);
+ }
+}
/**
* Register some default keywords.
diff --git a/mod/sitepages/views/default/sitepages/footer_menu.php b/mod/sitepages/views/default/sitepages/footer_menu.php
deleted file mode 100644
index d3858cb20..000000000
--- a/mod/sitepages/views/default/sitepages/footer_menu.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-/**
- * Footer view to add links to the semi-static pages.
- *
- * @package SitePages
- */
-?>
-
-<div class="footer_toolbar_links">|
-<a href="<?php echo elgg_get_site_url(); ?>pg/sitepages/read/About/"><?php echo elgg_echo('sitepages:about'); ?></a> |
-<a href="<?php echo elgg_get_site_url(); ?>pg/sitepages/read/Terms/"><?php echo elgg_echo('sitepages:terms'); ?></a> |
-<a href="<?php echo elgg_get_site_url(); ?>pg/sitepages/read/Privacy/"><?php echo elgg_echo('sitepages:privacy'); ?></a> |
-</div> \ No newline at end of file