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

[eluser]Unknown[/eluser]
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?
#2

[eluser]swdee[/eluser]
I agree.
#3

[eluser]PhilTem[/eluser]
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
#4

[eluser]ppwalks[/eluser]
A slug is a URL identifier i.e http://www.site.com/about-us/ "about-us" would be the slug!
#5

[eluser]Aken[/eluser]
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...).
#6

[eluser]bretticus[/eluser]
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.
#7

[eluser]predat0r[/eluser]
Best: https://github.com/ericbarnes/CodeIgniter-Slug-Library
#8

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




Theme © iAndrew 2016 - Forum software by © MyBB