EllisLab text mark
Advanced Search
     
Hello World (as suggested by the support team)
Posted: 23 October 2012 10:35 AM   [ Ignore ]
Joined: 2012-10-20
4 posts

Hi!

I have put the navigation header in a single php-file, namely /template/header(.php).

<ul id="navigation_header">
<
li><a href="home">Public Area</a></li>
<
li><a href="private_area">Private Area</a></li>
</
ul

In the controller “private_area”, there’s an index function, just delegating the programm flow to the appropriate view “private”:

public function index()
{

$this
->load->library('ion_auth');
$user $this->ion_auth->user()->row();
$this->data['username'$user->username;
$this->data['id'$user->id;

$this->load->view('templates/header');
$this->load->view('private'$this->data);
$this->load->view('templates/footer');

Ok, now I have some links in the view “private”, such as the changing of the passwort:
=> /auth/change_password

<div id="body">
Sie sind als '<?php echo $username; ?>' eingeloggt!
<
ul>
<
li><a href="auth/change_password">Passwort &auml;ndern</a></li>
</
ul>
</
div

If I click this link in the view “private”, then I the appropriate view is displayed.

But now, if I want to go back to the view “private”, I click the Link “Private Area” in the header.

Then this url will be invoked:
=> /auth/private_area

Of course, this leads to a 404 error. The url should be /private_area with no /auth as a prefix.

How can I manage this?

Thank you!

 
Posted: 06 November 2012 04:06 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-10-20
4 posts

I’ve now solved this problem.