Welcome Guest, Not a member yet? Register   Sign In
Tutorial error...?? (RESOLVED)
#18

[eluser]ivanhalen[/eluser]
[quote author="jamiejonks" date="1329422846"]If you have a page at index.php/news with links on it to news/slugname, as you will if you follow the news tutorial, you end up with links in the form of index.php/news/news/slugname, i.e. with two 'news' parts. Using the site_url() function or not typing 'news' into the href solves this, so the route given in the tutorial ($route['news/(:any)'] = 'news/view/$1'Wink works. I can't see how this modification is me 'not linking to the proper place', but rather that the tutorial contains an error.

Thanks for clarifying what the slug is, it's a shame the tutorial doesn't tell you not to put spaces in when manually creating a few records. Having said that, I'm sure at some point it would still be useful to know how to handle spaces (and anything 'unusual') in URLs. I haven't found a definitive 'best practice' answer to this.[/quote]

I just couldn't say better :-)
Yes, following the tutorial as-it-is leads to double "news" part in the url (index.php/news/news/slugname), that is a real pain for novices trying to approach MVC and wondering "where am I wrong? Am I so bad in PHP that I can't follow the most basic tutorial?"... (and yes, the "site_url" stuff solves the problem... and yes, I banged my head too, before realizing I wasn't the problem)

CI is well known for its documentation, among the other advantages: please, CI Masters, don't let users run away from this wonderful framework back to procedural programming just because the introducing tutorial could be written better! Fix it ASAP! Thanks


Messages In This Thread
Tutorial error...?? (RESOLVED) - by El Forum - 01-23-2012, 05:03 PM
Tutorial error...?? (RESOLVED) - by El Forum - 01-23-2012, 07:41 PM
Tutorial error...?? (RESOLVED) - by El Forum - 01-24-2012, 09:56 AM
Tutorial error...?? (RESOLVED) - by El Forum - 01-24-2012, 05:26 PM
Tutorial error...?? (RESOLVED) - by El Forum - 01-24-2012, 10:14 PM
Tutorial error...?? (RESOLVED) - by El Forum - 01-25-2012, 02:02 AM
Tutorial error...?? (RESOLVED) - by El Forum - 01-25-2012, 02:03 AM
Tutorial error...?? (RESOLVED) - by El Forum - 01-30-2012, 08:04 PM
Tutorial error...?? (RESOLVED) - by El Forum - 01-31-2012, 01:20 PM
Tutorial error...?? (RESOLVED) - by El Forum - 02-09-2012, 04:57 AM
Tutorial error...?? (RESOLVED) - by El Forum - 02-09-2012, 10:50 AM
Tutorial error...?? (RESOLVED) - by El Forum - 02-12-2012, 02:44 PM
Tutorial error...?? (RESOLVED) - by El Forum - 02-12-2012, 07:08 PM
Tutorial error...?? (RESOLVED) - by El Forum - 02-12-2012, 08:41 PM
Tutorial error...?? (RESOLVED) - by El Forum - 02-16-2012, 01:07 PM
Tutorial error...?? (RESOLVED) - by El Forum - 02-16-2012, 03:25 PM
Tutorial error...?? (RESOLVED) - by El Forum - 03-04-2012, 09:42 PM
Tutorial error...?? (RESOLVED) - by El Forum - 07-18-2012, 09:13 AM
Tutorial error...?? (RESOLVED) - by El Forum - 08-22-2012, 03:18 AM
Tutorial error...?? (RESOLVED) - by El Forum - 08-22-2012, 03:24 AM
Tutorial error...?? (RESOLVED) - by El Forum - 10-16-2012, 01:28 PM
Tutorial error...?? (RESOLVED) - by El Forum - 02-03-2013, 02:25 AM
Tutorial error...?? (RESOLVED) - by El Forum - 02-04-2013, 11:35 AM
Tutorial error...?? (RESOLVED) - by El Forum - 08-26-2014, 08:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB