• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
href to display page

#3
I've tried this to no avail.

I've copied the tutorial and it doesn't exactly break it down step by step for someone with no knowledge.

Example, its doesn't say where this needs to be, does it go at the bottom of the pages.php controller? Is it meant to have a } at the end and one taken away from the class? Because the manual doesn't explain it

public function view($page = 'home')
{
if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php'))
{
// Whoops, we don't have a page for that!
show_404();
}

$data['title'] = ucfirst($page); // Capitalize the first letter

$this->load->view('templates/header', $data);
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);
}
Reply


Messages In This Thread
href to display page - by dmorgan20 - 11-17-2019, 08:00 AM
RE: href to display page - by dave friend - 11-17-2019, 01:33 PM
RE: href to display page - by dmorgan20 - 11-18-2019, 10:34 AM
RE: href to display page - by dave friend - 11-18-2019, 12:23 PM
RE: href to display page - by dmorgan20 - 11-18-2019, 01:59 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.