Welcome Guest, Not a member yet? Register   Sign In
Simple Blog
#1

[eluser]georgerobbo[/eluser]
Hello,

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
#2

[eluser]brianw1975[/eluser]
I believe you want to read the user guide, specifically the following entries.

http://ellislab.com/codeigniter/user-gui...elper.html

and

http://ellislab.com/codeigniter/user-gui...uting.html
#3

[eluser]georgerobbo[/eluser]
I've read through and I still don't quite understand how to do it.
#4

[eluser]LuckyFella73[/eluser]
Usually you want to add the title of your blog entry to the url.
The user guide provides following example:
Code:
$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.
#5

[eluser]georgerobbo[/eluser]
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




Theme © iAndrew 2016 - Forum software by © MyBB