[eluser]Ivar89[/eluser]
I have 4 pages/links that are bassicly the same and three of them work but with one I get 404 error
Portfolio page doesn't work.
Part Controller:
Code:
<?php
class portfolio extends Controller {
function portfolio()
{
parent::Controller();
$this->load->model('port_insert_model');
if(!$this->user_model->Secure(array('userType' => 'admin')))
{
$this->session->set_flashdata('flashError', 'This is not a admin account');
redirect('admin/login');
}
}
function index()
{
$data['port'] = $this->port_insert_model->Get_Portfolio_Data($_POST);
$this->load->view('portfolio/index', $data, FALSE);
}
function step1()
{
$this->load->view('portfolio/step1');
}
view:
Code:
view('template/header') ?>
<?php $this->load->view('template/menu'); ?>
<div id="main2">
<fieldset>
<table>
<tr style="background-color: lightgrey;"> <td>Description</td> <td>Link</td></tr>
<tr> <td>Edit Your Menu items:</td> <td><a href="<?php echo site_url('menu'); ?>">Menu<a/></td></tr>
<tr> <td>Edit Your Page items:</td> <td><a href="<?php echo site_url('page'); ?>">Page<a/></td></tr>
<tr> <td>Edit Your News items:</td> <td><a href="<?php echo site_url('news'); ?>">News<a/></td></tr>
<tr> <td>Edit Your Portfolio items:</td> <td><a href="<?php echo site_url('portfolio'); ?>">portfolio<a/></td></tr>
</table>
</fieldset>
</div>
<?php $this->load->view('template/footer'); ?>>
Now the first three work!
I don't know where it goes wrong...:S
menu view:
Code:
<div id="menu">
<img src="/public/img/cms-design_02.gif" ></img>
<label class="button"><?php echo anchor('start/index', 'Home');?></label><br />
<label class="button"><?php echo anchor('start/content', 'Edit Content');?></label><br />
<label class="button"><?php echo anchor('start/create', 'Create');?></label><br />
<label class="button"><?php echo anchor('users/index', 'Users');?></label><br />
<label class="button"><?php echo anchor('page/upload_form', 'Upload img');?></label><br />
<label class="button"><?php echo anchor('admin/logout', 'Logout');?></label>
<img src="/public/img/cms-design_02_nieuw.gif">
<label class="button"><?php echo anchor('page/step1', 'Pagina');?></label><br />
<label class="button"><?php echo anchor('portfolio/step1', 'portfolio');?></label><br />
<label class="button"><?php echo anchor('news/step1', 'Publicaties');?></label><br />
<label class="button"><?php echo anchor('menu/create', 'Menu');?></label><br />
Again the portfolio one doesn't work...
(I know Its probably better to use anchor instead of href, but thats not the problem now.