Very basic issue: going thru the tutorial, News section, I found this: "...get a news item by its slug". Since I'm not in the News bussiness, I have to ask: what is a slug? I clicked on the word slug (it's actually a link) and it got me nowhere (the link goes to the top of the page). Thank God for Wikipedia, here's my answer: Anyway, for the sake of the obsessive-like-me types' sanity, could someone add a definition for 'slug' in the tutorial?

I agree.

Slug is no word coming just from press. It's a common English word known to native speakers (I ain't a native speaker so I didn't know what it is either). But using a dictionary helped learning Wink

A slug is a URL identifier i.e "about-us" would be the slug!

Yeah, the tutorial could use some cleaning up. A slug is better defined in the "Create News Items" portion of the tutorial, which I think should come before displaying the news (if you haven't created anything yet, nothing will show anyway...).

The most common definition of slug, as it pertains to CodeIgniter, is a string that references a record (or post) in something like a CMS (Content Management System...think Wordpress or PyroCMS.)

The purpose is to build a URI that is used as a substitute for a database ID. For example, consider the following URLs:



The latter uses a "slug" (bretticus-explains-slugs) that can be used to search a database story record with a corresponding field value, instead of using the story record's id field (123.) Slugs, by my definition, are popular for user-friendliness, style and SEO optimization.


I thing It's a way of generating a valid URL, generally using data already obtained. For instance, using the title of an article to generate a URL.

Gas Furnace Replacement

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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