SLUG? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: SLUG? (/showthread.php?tid=55133) |
SLUG? - El Forum - 10-11-2012 [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? SLUG? - El Forum - 11-14-2012 [eluser]swdee[/eluser] I agree. SLUG? - El Forum - 11-14-2012 [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 SLUG? - El Forum - 11-27-2012 [eluser]ppwalks[/eluser] A slug is a URL identifier i.e http://www.site.com/about-us/ "about-us" would be the slug! SLUG? - El Forum - 11-27-2012 [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...). SLUG? - El Forum - 11-28-2012 [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. SLUG? - El Forum - 12-01-2012 [eluser]predat0r[/eluser] Best: https://github.com/ericbarnes/CodeIgniter-Slug-Library SLUG? - El Forum - 12-03-2012 [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 |