I am trying to list the siblings of the current page, with each item on the next line with no blank lines between. I keep either getting blank lines between the items or I break the syntax somehow.
My test page is here:
http://globalforgivenessinitiative.com/about/test
I have this in the Front Matter
content:
items: ‘@self.siblings’
test list1
{% for p in page.collection.order(‘folder’,‘asc’) %}
[{{ p.title }}]({{ p.url }})
{% endfor %}
If I put the above on the page it works but there are blank lines between the links.
Contact
reroutes
GFI Outreach Report 2017
test list2
If I do it like this try and remove the blank lines the blank lines do get removed but the links no longer work as the source is displayed.
-
{% for p in page.collection.order('folder','asc') %}
- [{{ p.title }}]({{ p.url }}) {% endfor %}
Outputs:
Contact
reroutes
GFI Outreach Report 2017
test list3
As a variation I tried doing it this way, but all the links get broken as the {{ p.url }} gets rendered as the http://globalforgivenessinitiative.com/about/{{%20p.url%20}}
-
{% for p in page.parent.children if p != page %}
- {{ p.title }} {% endfor %}
Contact
reroutes
GFI Outreach Report 2017
(above 3 links all point to http://globalforgivenessinitiative.com/about/{{%20p.url%20}} )
I’ve tried a number of other variations, including switching on and off ‘Process Twig First’ and finally got convinced that I don’t know what I am doing and time to ask someone knowledgable. Anyone any ideas of how I can list links to siblings pages with no blank lines between them?