Categories For One Entry
1 2 {categories backspace="4"}<a href="{path=weblog/index}">{category_name}</a> > {/categories}
DZone Snippets > expressionengine
13374 users tagging and storing useful source code snippets
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
1 2 {categories backspace="4"}<a href="{path=weblog/index}">{category_name}</a> > {/categories}
1 2 <ul> 3 {exp:weblog:entries weblog="weblog"} 4 <li><a href="{url_title_path=template/view}">{title}</a></li> 5 {/exp:weblog:entries} 6 </ul>
1 2 {exp:weblog:categories weblog="name" show_empty="no" id="left_nav"} 3 <a href="{path="template"}">{category_name}</a> 4 {/exp:weblog:categories}
1 2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 3 4 <html> 5 <head> 6 <title>Quick Cheat Sheet</title> 7 8 <style type="text/css"> 9 <!-- 10 body{ 11 background:#eee; 12 color:#333; 13 font: 11px Arial, sans-serif; 14 } 15 table { 16 float:left; 17 margin:5px; 18 border:1px solid #ccc; 19 } 20 .heading{ 21 background:#ddd; 22 } 23 --> 24 </style> 25 </head> 26 <body> 27 28 <table summary="Weblog IDs" cellpadding="5"> 29 <tr class="heading"> 30 <td><b>Full Weblog Name</b></td> 31 <td><b>Short Name</b></td> 32 <td><b>Weblog ID</b></td> 33 </tr> 34 {exp:query sql="SELECT weblog_id, blog_name, blog_title, blog_url FROM exp_weblogs ORDER BY blog_title"} 35 <tr> 36 <td>{blog_title}</td> 37 <td>{blog_name}</td> 38 <td>{weblog_id}</td> 39 </tr> 40 {/exp:query} 41 </table> 42 43 <table summary="Custom Field IDs" cellpadding="5"> 44 <tr class="heading"> 45 <td><b>Full Field Name</b></td> 46 <td><b>Short Name</b></td> 47 <td><b>Field Type</b></td> 48 </tr> 49 {exp:query sql="SELECT group_id, field_name, field_label, field_type FROM exp_weblog_fields ORDER BY field_name"} 50 <tr> 51 <td>{field_label}</td> 52 <td>{field_name}</td> 53 <td>{field_type}</td> 54 </tr> 55 {/exp:query}</table> 56 57 <table summary="Category IDs" cellpadding="5"> 58 <tr class="heading"> 59 <td><b>Full Category Name</b></td> 60 <td><b>Category ID</b></td> 61 </tr> 62 {exp:query sql="SELECT cat_name, cat_id, group_id FROM exp_categories ORDER BY group_id"} 63 <tr> 64 <td>{cat_name}</td> 65 <td>{cat_id}</td> 66 </tr> 67 {/exp:query}</table> 68 69 </body> 70 </html>
1 2 {exp:query sql="SELECT weblog_id, blog_name, blog_title, blog_url FROM exp_weblogs WHERE weblog_id != '100' ORDER BY blog_title"} 3 <li><a href="{blog_url}">{blog_title}</a></li> 4 {/exp:query}
1 2 {exp:query sql="SELECT count(exp_category_posts.entry_id) AS count,exp_category_posts.cat_id, exp_categories.cat_name 3 FROM exp_categories, exp_category_posts WHERE exp_category_posts.cat_id = exp_categories.cat_id GROUP BY exp_categories.cat_name"} 4 5 <a href="{path=weblog/view}C{cat_id}/">{cat_name} 6 </a> ({count}) 7 8 {/exp:query}
1 {exp:weblog:categories weblog="weblog1"} 2 <a href="{path=weblog/index}">{category_name}</a> 3 {exp:query sql="SELECT count(exp_category_posts.entry_id) AS count 4 FROM exp_category_posts WHERE exp_category_posts.cat_id = {category_id} "} 5 ({count} entries) 6 {/exp:query} 7 {/exp:weblog:categories}
1 2 <ul> 3 {exp:weblog:related_entries weblog="caps" orderby="title" sort="asc"} 4 <li><a href="{title_permalink="caps/view"}">{title}</a></li> 5 {/exp:weblog:related_entries} 6 </ul>
1 {exp:weblog:category_heading weblog="weblog"}{category_name}{/exp:weblog:category_heading}