Closed bricebou closed 10 years ago
Hey Dan,
After searching inside picotags plugin, I've spent some time inside my theme index.html and on both pico and twig documentations.
I've managed to solve this issue by using a nested if statement after checking if the current_page array is empty or not. Here is the code structure:
{% if is_front_page %}
FRONT PAGE
{% elseif current_page is not empty %}
{% if meta.tags is not empty %}
BLOG POSTS WITH TAGS
{% else %}
BLOG POSTS WITHOUT TAGS
{% endif %}
{% elseif current_page is empty %}
{% if meta.title != 'Error 404' %}
TAG PAGES : list of blog posts tagged with #...
{% endif %}
{% endif %}
The last {% else %} for single page as proposed in the doc seems to never be taken into account for post without tags ; but maybe it's for other pages ? What do you think ? Should I add this to the doc ?
Thanks again :)
Yep that looks good. I'll await the PR.
Dan,
I've updated the documentation with this template structure as an alternative. I hope it suits you and my english isn't too bad. It appears on the pull request https://github.com/DanReeves/picotags/pull/9
See you
Dan,
If an article doesn't have Tags in its meta, or if the meta Tags is empty, the artile doesn't appear but instead I have a page with the article meta.title but its content is something like this:
with a list of all the articles...
I've tried to modify my theme index.html but without result...
Here is the scheme I'm using, based on your documentation:
But I don't see how to change the if statement...
Any idea ? Thanks :)