EllisLab text mark
Advanced Search
     
SLUG?
Posted: 11 October 2012 11:49 AM   [ Ignore ]
Joined: 2012-10-11
1 posts

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: http://en.wikipedia.org/wiki/Slug_(production). Anyway, for the sake of the obsessive-like-me types’ sanity, could someone add a definition for ‘slug’ in the tutorial?

 
Posted: 14 November 2012 02:19 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-11-14
3 posts

I agree.

 
Posted: 14 November 2012 04:26 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2011-02-23
882 posts

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

 Signature 

ignited Community Framework (WiP)  |  Read the User’s Guide. It won’t bite.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

CI example .htaccess

 
Posted: 27 November 2012 07:57 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2012-01-02
117 posts

A slug is a URL identifier i.e http://www.site.com/about-us/  “about-us” would be the slug!

 Signature 

Perfection can be quantified by measurement, measure yourself…

 
Posted: 27 November 2012 07:46 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-28
2435 posts

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…).

 
Posted: 28 November 2012 05:08 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-11
966 posts

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:

http://www.mydomain.tld/story/123

http://www.mydomain.tld/story/bretticus-explains-slugs

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.

 Signature 

Google Analytics HOWTO | Enable GET | Netbeans PHP Integration

 
Posted: 01 December 2012 04:06 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2010-10-14
127 posts

Best: https://github.com/ericbarnes/CodeIgniter-Slug-Library

 
Posted: 03 December 2012 07:36 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2012-12-03
4 posts

Hallo.
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