v0.9.7
This commit is contained in:
@@ -2,4 +2,4 @@
|
|||||||
name = GroupBy Examples
|
name = GroupBy Examples
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
lektor-groupby = 0.9.6
|
lektor-groupby = 0.9.7
|
||||||
|
|||||||
@@ -279,11 +279,14 @@ This is useful if you do not want to create subpages but rather an index page co
|
|||||||
This can be done in combination with the next use-case:
|
This can be done in combination with the next use-case:
|
||||||
|
|
||||||
```jinja2
|
```jinja2
|
||||||
{%- for x in this|vgroups('TestA', 'TestB', recursive=True)|unique|sort %}
|
{%- for x in this|vgroups(keys=['TestA', 'TestB'], fields=[], flows=[], recursive=True)|unique|sort %}
|
||||||
<a href="{{ x|url }}">({{ x.group }})</a>
|
<a href="{{ x|url }}">({{ x.group }})</a>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can query the groups of any parent node (including those without slug).
|
You can query the groups of any parent node (including those without slug).
|
||||||
|
[`templates/page.html`](./templates/page.html) uses this.
|
||||||
The keys (`'TestA', 'TestB'`) can be omitted which will return all groups of all attributes (you can still filter them with `x.config.key == 'TestC'`).
|
The keys (`'TestA', 'TestB'`) can be omitted which will return all groups of all attributes (you can still filter them with `x.config.key == 'TestC'`).
|
||||||
Refer to [`templates/page.html`](./templates/page.html) for usage.
|
The `fields` and `flows` params are also optional.
|
||||||
|
With these you can match groups in `args.key.fieldKey` and `args.key.flowKey`.
|
||||||
|
For example, if you have a “tags” field and an “additional-tags” field and you only want to show one in a preview.
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -13,7 +13,7 @@ setup(
|
|||||||
},
|
},
|
||||||
author='relikd',
|
author='relikd',
|
||||||
url='https://github.com/relikd/lektor-groupby-plugin',
|
url='https://github.com/relikd/lektor-groupby-plugin',
|
||||||
version='0.9.6',
|
version='0.9.7',
|
||||||
description='Cluster arbitrary records with field attribute keyword.',
|
description='Cluster arbitrary records with field attribute keyword.',
|
||||||
long_description=longdesc,
|
long_description=longdesc,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|||||||
Reference in New Issue
Block a user