-
-
Save pvledoux/6220195 to your computer and use it in GitHub Desktop.
Revisions
-
croxton revised this gist
Aug 13, 2013 . 1 changed file with 1 addition and 43 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -109,49 +109,7 @@ Example output: <li> Ashton & Bentley (2013-02-27) </li> <li> Agape (2013-02-27) </li> </ul> <h1> 2012 </h1> -
croxton revised this gist
Aug 13, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ {exp:stash:set_list name="entries" parse_tags="yes"} {exp:channel:entries channel="my_channel" orderby="date" sort="desc" dynamic="no" limit="999"} {stash:title}{title}{/stash:title} {stash:date_day}{entry_date format="%d"}{/stash:date_day} -
croxton revised this gist
Aug 13, 2013 . 2 changed files with 180 additions and 65 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,65 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,180 @@ {exp:stash:set_list name="entries" parse_tags="yes"} {exp:channel:entries channel="my_channel" orderby="date" sort="desc" dynamic="no" limit="999"} {stash:title}{title}{/stash:title} {stash:date_day}{entry_date format="%d"}{/stash:date_day} {stash:date_month}{entry_date format="%m"}{/stash:date_month} {stash:date_year}{entry_date format="%Y"}{/stash:date_year} {stash:date_sort}{entry_date format="%Y-%F"}{/stash:date_sort} {stash:date_machine}{entry_date}{/stash:date_machine} {/exp:channel:entries} {/exp:stash:set_list} {!-- make a copy containing only the years, so we can find all unique years--} {exp:stash:set_list name="years" parse_tags="yes"} {exp:stash:get_list name="entries"} {stash:date_year}{date_year}{/stash:date_year} {/exp:stash:get_list} {/exp:stash:set_list} {!-- make list of months in reverse order --} {exp:stash:set_list name="months"} {stash:month}December{/stash:month} {stash:month}November{/stash:month} {stash:month}October{/stash:month} {stash:month}September{/stash:month} {stash:month}August{/stash:month} {stash:month}July{/stash:month} {stash:month}June{/stash:month} {stash:month}May{/stash:month} {stash:month}April{/stash:month} {stash:month}March{/stash:month} {stash:month}February{/stash:month} {stash:month}January{/stash:month} {/exp:stash:set_list} {!-- put it all together --} {exp:stash:get_list name="years" unique="yes" orderby="date_year" sort="desc"} <h1>{date_year}</h1> {exp:stash:get_list:months name="months"} {exp:stash:get_list:entries name="entries" match="#^{date_year}-{month}$#" against="date_sort" orderby="date_machine" sort="desc" prefix="entry" } {if entry:count==1} <h2>{month}</h2> <ul> {/if} <li>{title} ({date_year}-{date_month}-{date_day})</li> {if entry:count==entry:total_results} </ul> {/if} {/exp:stash:get_list:entries} {/exp:stash:get_list:months} {/exp:stash:get_list} Example output: <h1> 2013 </h1> <h2> May </h2> <ul> <li> Vitra (2013-05-08) </li> <li> Victoria + Albert Baths (2013-05-08) </li> <li> Vado (2013-05-08) </li> <li> NotOnlyWhite (2013-05-08) </li> <li> Kaldewei (2013-05-08) </li> <li> Bisque (2013-05-01) </li> <li> Hansgrohe (2013-05-01) </li> <li> Majestic Showers (2013-05-01) </li> <li> Inda (2013-05-01) </li> <li> Grohe (2013-05-01) </li> <li> Fantini (2013-05-01) </li> </ul> <h2> April </h2> <ul> <li> Kanth (2013-04-12) </li> <li> Bette (2013-04-10)</li> </ul> <h2> February </h2> <ul> <li> PomD'or (2013-02-27) </li> <li> Vola (2013-02-27) </li> <li> Lefroy Brooks (2013-02-27) </li> <li> Laufen (2013-02-27) </li> <li> Falper (2013-02-27) </li> <li> Flaminia (2013-02-27) </li> <li> Dornbracht (2013-02-27) </li> <li> Bard & Brazier (2013-02-27) </li> <li> Graff (2013-02-27) </li> <li> Ashton & Bentley (2013-02-27) </li> <li> Agape (2013-02-27) </li> </ul> <h1> 2013 </h1> <h2> May </h2> <ul> <li> Vitra (2013-05-08) </li> <li> Victoria + Albert Baths (2013-05-08) </li> <li> Vado (2013-05-08) </li> <li> NotOnlyWhite (2013-05-08) </li> <li> Kaldewei (2013-05-08) </li> <li> Bisque (2013-05-01) </li> <li> Hansgrohe (2013-05-01) </li> <li> Majestic Showers (2013-05-01) </li> <li> Inda (2013-05-01) </li> <li> Grohe (2013-05-01) </li> <li> Fantini (2013-05-01) </li> </ul> <h2> April </h2> <ul> <li> Kanth (2013-04-12) </li> <li> Bette (2013-04-10) </li> </ul> <h2> February </h2> <ul> <li> PomD’or (2013-02-27) </li> <li> Vola (2013-02-27) </li> <li> Lefroy Brooks (2013-02-27) </li> <li> Laufen (2013-02-27) </li> <li> Falper (2013-02-27) </li> <li> Flaminia (2013-02-27) </li> <li> Dornbracht (2013-02-27) </li> <li> Bard & Brazier (2013-02-27) </li> <li> Graff (2013-02-27) </li> <li> Ashton & Bentley (2013-02-27) </li> <li> Agape (2013-02-27) </li> </ul> <h1> 2012 </h1> <h2> December </h2> <ul> <li> Vitra (2012-12-08) </li> <li> Victoria + Albert Baths (2012-12-08) </li> <li> Vado (2012-12-08) </li> <li> NotOnlyWhite (2012-12-08) </li> <li> Kaldewei (2012-12-08) </li> <li> Bisque (2012-12-01) </li> <li> Hansgrohe (2012-12-01) </li> <li> Majestic Showers (2012-12-01) </li> <li> Inda (2012-12-01) </li> <li> Grohe (2012-12-01) </li> <li> Fantini (2012-12-01) </li> </ul> <h2> April </h2> <ul> <li> Kanth (2012-04-12) </li> <li> Bette (2012-04-10)</li> </ul> -
croxton revised this gist
Aug 13, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ {exp:stash:set_list name="entries" parse_tags="yes"} {exp:channel:entries channel="my_channel" orderby="date" sort="desc" dynamic="no" limit="999"} {stash:title}{title}{/stash:title} {stash:date_day}{entry_date format="%d"}{/stash:date_day} {stash:date_month}{entry_date format="%m"}{/stash:date_month} -
croxton revised this gist
Aug 13, 2013 . 1 changed file with 55 additions and 55 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,65 +1,65 @@ {exp:stash:set_list name="entries" parse_tags="yes"} {exp:channel:entries channel="brands" orderby="date" sort="desc" dynamic="no" limit="999"} {stash:title}{title}{/stash:title} {stash:date_day}{entry_date format="%d"}{/stash:date_day} {stash:date_month}{entry_date format="%m"}{/stash:date_month} {stash:date_year}{entry_date format="%Y"}{/stash:date_year} {stash:date_sort}{entry_date format="%Y-%F"}{/stash:date_sort} {stash:date_machine}{entry_date}{/stash:date_machine} {/exp:channel:entries} {/exp:stash:set_list} {!-- make a copy containing only the years, so we can find all unique years--} {exp:stash:set_list name="years" parse_tags="yes"} {exp:stash:get_list name="entries"} {stash:date_year}{date_year}{/stash:date_year} {/exp:stash:get_list} {/exp:stash:set_list} {!-- make list of months in reverse order --} {exp:stash:set_list name="months"} {stash:month}December{/stash:month} {stash:month}November{/stash:month} {stash:month}October{/stash:month} {stash:month}September{/stash:month} {stash:month}August{/stash:month} {stash:month}July{/stash:month} {stash:month}June{/stash:month} {stash:month}May{/stash:month} {stash:month}April{/stash:month} {stash:month}March{/stash:month} {stash:month}February{/stash:month} {stash:month}January{/stash:month} {/exp:stash:set_list} {!-- put it all together --} {exp:stash:get_list name="years" unique="yes" orderby="date_year" sort="desc"} <h1>{date_year}</h1> {exp:stash:get_list:months name="months"} {exp:stash:get_list:entries name="entries" match="#^{date_year}-{month}$#" against="date_sort" orderby="date_machine" sort="desc" prefix="entry" } {if entry:count==1} <h2>{month}</h2> <ul> {/if} <li>{title} ({date_year}-{date_month}-{date_day})</li> {if entry:count==entry:total_results} </ul> {/if} {/exp:stash:get_list:entries} {/exp:stash:get_list:months} {/exp:stash:get_list} -
croxton created this gist
Aug 13, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,65 @@ {exp:stash:set_list name="entries" parse_tags="yes"} {exp:channel:entries channel="brands" orderby="date" sort="desc" dynamic="no" limit="999"} {stash:title}{title}{/stash:title} {stash:date_day}{entry_date format="%d"}{/stash:date_day} {stash:date_month}{entry_date format="%m"}{/stash:date_month} {stash:date_year}{entry_date format="%Y"}{/stash:date_year} {stash:date_sort}{entry_date format="%Y-%F"}{/stash:date_sort} {stash:date_machine}{entry_date}{/stash:date_machine} {/exp:channel:entries} {/exp:stash:set_list} {!-- make a copy containing only the years, so we can find all unique years--} {exp:stash:set_list name="years" parse_tags="yes"} {exp:stash:get_list name="entries"} {stash:date_year}{date_year}{/stash:date_year} {/exp:stash:get_list} {/exp:stash:set_list} {!-- make list of months in reverse order --} {exp:stash:set_list name="months"} {stash:month}December{/stash:month} {stash:month}November{/stash:month} {stash:month}October{/stash:month} {stash:month}September{/stash:month} {stash:month}August{/stash:month} {stash:month}July{/stash:month} {stash:month}June{/stash:month} {stash:month}May{/stash:month} {stash:month}April{/stash:month} {stash:month}March{/stash:month} {stash:month}February{/stash:month} {stash:month}January{/stash:month} {/exp:stash:set_list} {!-- put it all together --} {exp:stash:get_list name="years" unique="yes" orderby="date_year" sort="desc"} <h1>{date_year}</h1> {exp:stash:get_list:months name="months"} {exp:stash:get_list:entries name="entries" match="#^{date_year}-{month}$#" against="date_sort" orderby="date_machine" sort="desc" prefix="entry" } {if entry:count==1} <h2>{month}</h2> <ul> {/if} <li>{title} ({date_year}-{date_month}-{date_day})</li> {if entry:count==entry:total_results} </ul> {/if} {/exp:stash:get_list:entries} {/exp:stash:get_list:months} {/exp:stash:get_list}