Welcome Guest, Not a member yet? Register   Sign In
Hello World (as suggested by the support team)
#1

[eluser]jookoo[/eluser]
Hi!

I have put the navigation header in a single php-file, namely /template/header(.php).
Code:
<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":
Code:
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

Code:
<div id="body">
Sie sind als '&lt;?php echo $username; ?&gt;' 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!
#2

[eluser]jookoo[/eluser]
I've now solved this problem.




Theme © iAndrew 2016 - Forum software by © MyBB