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') %} |
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 |