Help with planning a CI project

Quote:echo auto_typography($post_data['title']);
echo auto_typography($post_data['body']);
shouldn't that be
echo auto_typography($title);
echo auto_typography($body);

oh wait, never mind.

Change that to

echo auto_typography($page_data['title']);
echo auto_typography($page_data['body']);

Thanks again.

That's removed the first error, but it now doesn't recognise 'title' or 'body'.

A PHP Error was encountered

Severity: Notice

Message: Undefined index: title

Filename: controllers/page.php

Line Number: 23


A PHP Error was encountered

Severity: Notice

Message: Undefined variable: body

Filename: views/public_page.php

Line Number: 3

Thanks again for the help

Hmm, even with that change, I still seem to be getting the errors.

Could it be with my SQL table?

right after you call your model function
$data['page_data'] = $this->MPages->getPageBySlug($slug);
put in 2 debug lines
echo $this->db->last_query();

and paste the output here

SELECT * FROM (`pages`) WHERE `slug` = '$2' LIMIT 1Array ( )

Thanks again for the help.

show me your routes.php setup

$route['default_controller'] = "page";
$route['page/:any/:any'] = "page/pages/$2";
$route['scaffolding_trigger'] = "";

try putting parenthesis around the any statements:
$route['page/(:any)/(:any)'] = "page/pages/$2";


Thanks theprodigy, it's working Big Grin

And just to be super super annoying.

If I wanted to have a page which was just aboutus/ what would I do?

This would be the main About Us page, before you get into Location etc.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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