Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Tagcloud with more than one route

Started by Muut Archive 10 years ago · 2 replies · 459 views
10 years ago

Hello,
In the taxonomylist plugin, is it possible to configure tagcloud for more than one route?

For example:
Routes:

  • Trip -> 2 posts tagged "Ipanema"
  • Photo -> 5 posts tagged "Ipanema"

In the plugin config:
Route: /trip

Tagcloud correctly displays 7 posts tagged "Ipanema", but when we click on the link, the site only displays the 2 Trip posts. (obvious)

Please, any tips for changing this behavior?

Thanks!

10 years ago

Hello Perlkönig,
I'm referring to the Taxonomylist plugin. Tagcloud is a term used in Brazil, so it is not a reference to the tagcloud plugin ok?
I have a cloud of tags, with the following code:

TWIG

taxonomylist.html.twig
{% set taxlist = taxonomylist.get() %}

{% if taxlist %}
<div class="tagcloud">
    {% for tax,value in taxlist[taxonomy] %}
      {% set active = uri.param(taxonomy) == tax ? 'active' : '' %}
      <a class="{{ active }}" title="{{ value }} {# {{ 'TOPICS'|t }} #}" href="{{ base_url_absolute }}/{{ taxonomy }},{{ config.system.param_sep }},{{ tax|e('url') }}">{{ tax }}</a>
    {% endfor %}
</div>
{% endif %}
---

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1354 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4064 9 years ago
Archive · by Muut Archive, 9 years ago
1 2951 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago