• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Blog


I'm starting to develop a simple blog/article. I am a php beginner, but perfectly capable of bringing content down from a database etc etc.

But what I don't quite understand is how to get codeigniter/php to create the virtual url's whenever an article is requested.

Thank you

I believe you want to read the user guide, specifically the following entries.




I've read through and I still don't quite understand how to do it.

Usually you want to add the title of your blog entry to the url.
The user guide provides following example:
$title = "What's wrong with CSS?";
$url_title = url_title($title, 'underscore', TRUE);
// Produces: whats_wrong_with_css

the "TRUE" paramter tells CI to set all lowercase it's not a must.

If that is not what you meant please describe what kind of virtual
url you want to have.

I think I understand. So how do I then process these titles from my database into a page because I must have a controller to load my views etc.

Do I also add URL routing to create a non existent directory. E.g. from http://www.example.com/whats_wrong_with_css to http://www.example.com/article/whats_wrong_with_css

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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