Last active
November 23, 2021 14:26
-
-
Save remitbri/5531487 to your computer and use it in GitHub Desktop.
The aim is to list all the essays for all the categories an essay belongs to, in the context of essay.lens in a koken.me project.
As of Koken v0.7.1, the solution https://gist.github.com/bradleyboy/0b4c335141bb2d22634f crashes the page. So, instead, manually, the solution below (rinse and repeat for all the categories of your project)…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<koken:categories> | |
<koken:loop> | |
<koken:if data="category.id" equals="1"> | |
Also in <strong>{{ category.title }}</strong> | |
<ul> | |
<koken:load source="essays" filter:category="1"> | |
<koken:loop> | |
<li> | |
<koken:link> | |
{{ essay.title }} | |
</koken:link> | |
</li> | |
</koken:loop> | |
</koken:load> | |
</ul> | |
</koken:if> | |
<koken:if data="category.id" equals="2"> | |
Also in <strong>{{ category.title }}</strong> | |
<ul> | |
<koken:load source="essays" filter:category="2"> | |
<koken:loop> | |
<li> | |
<koken:link> | |
{{ essay.title }} | |
</koken:link> | |
</li> | |
</koken:loop> | |
</koken:load> | |
</ul> | |
</koken:if> | |
[etc etc etc] | |
</koken:loop> | |
</koken:categories> |
I am doing a statistics project for https://www.the-essays.com/statistics-project
and I'm glad I've found your code. Even thought it's old but still helpful and relevant
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem fixed with v0.8.0 if I remember well, it's v0.9.2 at the time of writing of this comment, so I'm not deleting this for not breaking links to this, really.