how to use the sorter

33 views
Skip to first unread message

Philippe Clérié

unread,
Sep 3, 2013, 6:03:53 PM9/3/13
to hyde...@googlegroups.com
Hello,

I am try to use the sorter to sort two sets of files. One by time created one by time published. Each set of files is in its own directory. In my site.yaml I have:

sorter:
    time:
        attr:
            - meta.created
        reverse: true
        filters:
            source.kind: html
            meta.listable: true
    pub:
        attr:
            - meta.published
        reverse: true
        filters:
            source.kind: html
            meta.listable: true

So in page_index.j2 which will use the pub sort:

{% for r in resource.node.walk_resources_sorted_by_pub() %}
  <li>{{ render_excerpt(r) }}</li>
{% endfor %}

But my page is empty. Sort by time works just fine thank you.

I also tried the pub configuration in meta.yaml in the relevant directory and that does not work either.

So what am I doing wrong?

Regards
Philippe
Reply all
Reply to author
Forward
0 new messages