From 08153b61b6bdfe5a31ca1a571e682c3b5f55bfb7 Mon Sep 17 00:00:00 2001 From: Michael Francis Date: Sun, 5 Jun 2011 21:20:42 -0400 Subject: Switches nav bars depending on authentication state --- views/elements/authnav.html.php | 42 ++++++++++++++++++++++++++++ views/elements/normalnav.html.php | 40 ++++++++++++++++++++++++++ views/layouts/default.html.php | 59 ++++++++++++--------------------------- 3 files changed, 100 insertions(+), 41 deletions(-) create mode 100644 views/elements/authnav.html.php create mode 100644 views/elements/normalnav.html.php (limited to 'views') diff --git a/views/elements/authnav.html.php b/views/elements/authnav.html.php new file mode 100644 index 0000000..80493ba --- /dev/null +++ b/views/elements/authnav.html.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/views/elements/normalnav.html.php b/views/elements/normalnav.html.php new file mode 100644 index 0000000..460eb16 --- /dev/null +++ b/views/elements/normalnav.html.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index f295caf..9168006 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -1,4 +1,6 @@

Kameleon

- -
- + //If their is data (the user has logged in) + if ($user) { + echo $this->_render('element', 'authnav', compact('user')); + } + else { + echo $this->_render('element', 'normalnav', compact('user')); + } + ?> + +
+
content(); ?> -- cgit v1.2.3