Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Quick Cheat Sheet (See related posts)

DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Quick Cheat Sheettitle>





"WeblogIDs" cellpadding="5">
"heading">

{exp:query sql="SELECTweblog_id,blog_name,blog_title,blog_urlFROMexp_weblogsORDERBYblog_title"}

{/exp:query}
Full Weblog Name Short Name Weblog ID
{blog_title} {blog_name} {weblog_id}
"CustomFieldIDs" cellpadding="5"> "heading"> {exp:query sql="SELECTgroup_id,field_name,field_label,field_typeFROMexp_weblog_fieldsORDERBYfield_name"} {/exp:query}
Full Field Name Short Name Field Type
{field_label} {field_name} {field_type}
"CategoryIDs" cellpadding="5"> "heading"> {exp:query sql="SELECTcat_name,cat_id,group_idFROMexp_categoriesORDERBYgroup_id"} {/exp:query}
Full Category Name Category ID
{cat_name} {cat_id}


This EE code will create a quick Cheat Sheet that will list all your Weblogs with their short names and IDs, all your Custom Fields with their short names, and all your Categories with their IDs. This one page will save you having to look this up in the Admin panel constantly when editing/creating templates for your site. :)
Also posted at the EEWiki:
http://www.eewiki.com/wiki/Cheat_Sheet.

Comments on this post

jtnt posts on Aug 09, 2006 at 20:31
I've edited this at the Wiki to include the field_id for each custom field. Just a heads up. You might want to update your code here as well.

You need to create an account or log in to post comments to this site.


Related Posts