Left: | ||
Right: |
OLD | NEW |
---|---|
1 product = foo | 1 product = foo |
2 title = test_metadata | 2 title = test_metadata |
3 tags = [popular, bar] | 3 tags = [popular, bar] |
4 <h1> Unfiltered </h1> | 4 <h1> Unfiltered </h1> |
5 <ul> | 5 <ul> |
6 {%- for unfiltered_page in get_pages_metadata()|sort %} | 6 {%- for unfiltered_page in get_pages_metadata()|sort(attribute='page') %} |
Sebastian Noack
2018/04/18 21:12:27
Nit: The changes here seem unrelated now. Still it
rosie
2018/04/18 22:46:18
Is there any advantage to committing it separately
Sebastian Noack
2018/04/19 00:22:25
If this change is unrelated, i.e. can be separated
rosie
2018/04/19 03:31:01
Sounds good. Done.
| |
7 <li>title : {{ unfiltered_page['page']}} </li> | 7 <li>title : {{ unfiltered_page['page']}} </li> |
8 {%- endfor %} | 8 {%- endfor %} |
9 </ul> | 9 </ul> |
10 | 10 |
11 <h1> Filtered </h1> | 11 <h1> Filtered </h1> |
12 <ul> | 12 <ul> |
13 {%- for filtered_page in get_pages_metadata({'tags': ['popular', 'bar']})|so rt -%} | 13 {%- for filtered_page in get_pages_metadata({'tags': ['popular', 'bar']})|so rt(attribute='page') -%} |
14 <li>title : {{ filtered_page['page'] }} </li> | 14 <li>title : {{ filtered_page['page'] }} </li> |
15 {%- endfor %} | 15 {%- endfor %} |
16 </ul> | 16 </ul> |
17 | 17 |
18 <h1> String Filter For Listy Option </h1> | 18 <h1> String Filter For Listy Option </h1> |
19 <ul> | 19 <ul> |
20 {%- for filtered_page in get_pages_metadata({'tags': 'popular'})|sort -%} | 20 {%- for filtered_page in get_pages_metadata({'tags': 'popular'})|sort(attrib ute='page') -%} |
21 <li>title : {{ filtered_page['page'] }} </li> | 21 <li>title : {{ filtered_page['page'] }} </li> |
22 {%- endfor %} | 22 {%- endfor %} |
23 </ul> | 23 </ul> |
OLD | NEW |