NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| SELECT * | |
| FROM | |
| ( | |
| SELECT cp.cat_id, cp.entry_id, ct.title, | |
| @num := if(@group = cp.cat_id, @num + 1, 1) as row_number, | |
| @group := cp.cat_id as group_key | |
| FROM (SELECT @group:=null,@num:=0) n | |
| CROSS JOIN exp_category_posts cp | |
| LEFT JOIN exp_channel_titles ct on cp.entry_id = ct.entry_id | |
| ORDER BY cp.cat_id |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| {exp:channel:entries | |
| limit="1" | |
| disable="member_data|pagination|categories" | |
| channel="page" | |
| } | |
| {!-- set fields based on language selection --} | |
| {exp:switchee variable="{global:lang}" parse="inward"} | |
| {!-- default language --} |
| ################################################################################# | |
| # | |
| # - ExpressionEngine index.php ModRewrite Removal - | |
| # compatible with Google Analytics Tracking | |
| # | |
| ################################################################################## | |
| RewriteEngine on |
| // This will execute the exp:tag if first segment is empty | |
| {if segment_1 != ''} | |
| {exp:class:method} | |
| {if var == "foo"} | |
| Lorem | |
| {if:else} | |
| Ipsum | |
| {/if} | |
| {/exp:class:method} |
| alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
| # Description: | |
| # A couple of useful bash one-liners for finding all of the extension hooks in | |
| # a given ExpressionEngine installation. Here's what it does: | |
| # | |
| # 1. Finds all of the native hooks, and any third-party hooks; | |
| # 2. Sorts them alphabetically; | |
| # 3. Outputs them to STDOUT or a file of your choosing. | |
| # | |
| # Usage: | |
| # CD to the `/system/expressionengine/` directory of your site, and run |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| // Media Queries in Sass 3.2 | |
| // | |
| // These mixins make media queries a breeze with Sass. | |
| // The media queries from mobile up until desktop all | |
| // trigger at different points along the way | |
| // | |
| // And important point to remember is that and width | |
| // over the portrait width is considered to be part of the | |
| // landscape width. This allows us to capture widths of devices | |
| // that might not fit the dimensions exactly. This means the break |