I’m banging my head over this. So I have the taxonomyList plugin producing a tag cloud. Their template is:
{% if taxlist %}
<div class="tags">
{% for tax,value in taxlist[taxonomy] %}
{% set active = uri.param(taxonomy) == tax ? 'active' : '' %}
<a class="{{ active }}" href="{{ base_url }}/{{ taxonomy }}:{{ tax }}">
{{ tax }}
</a>
{% endfor %}
</div>
{% endif %}
On my local machine this produces the url http://localhost:8888/tag:example
This just produces a 404 for me.
I call it in a separate /tags page that lists all the tags on the site. This example was taken from the antimatter theme’s sidebar.
{% if config.plugins.taxonomylist.enabled %}
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
{% endif %}
My question is how does this work and can Grab create the required pages for this?
Is your local machine a Windows? If so, param_sep
should be set to a semi-colon (;
) in configuration. Then use {{ param_sep }}
in your Twig so you’ll always be using the correct separator.
No I’m running MacOS with MAMP
Solved. My problem was because I wasn’t using the server root directory for my grav install. So the plugin was creating the link back to localhost:8888/tag:example
. Whereas my site was at localhost:8888/site.com/
. My mistake, but might as well leave this up in case someone else encounters this.
Hello guys,
I have almost the same problem, but not exactly …
What should catch the /tag:something slug in the url?
If I click on the tag listed in the post itself, it redirects me to the root/tag:something and that gives me 404, but if I click on the tag inside category (folder with items) gives me (root/some-category/tag:something) and that lists all posts containing this tag I’ve clicked in the particular folder.
The goal is to get list of all items with this tag name, no matter what is the current url. Why is that not working by default?
I am using custom theme based on quark, but even with quark itself I have the same issue. Under Windows (XAMPP) and Ubuntu 16.04. What I miss here?
Thanks!
Okay, I solved it. If you manage to list all (children) the posts in the home page, then all tag selections work.
// I still can’t force my brain to think plain without DBs