Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: tests/test_site/pages/sitemap.tmpl

Issue 29516687: Issue 4488 - Add support for JSON page front matter (Closed) Base URL: https://hg.adblockplus.org/cms
Patch Set: Fixed .gitignore and comment placement Created April 18, 2018, 2:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/test_site/pages/metadata_old_comment.tmpl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
OLDNEW
« no previous file with comments | « tests/test_site/pages/metadata_old_comment.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld