getgrav / grav-plugin-taxonomylist

Grav TaxonomyList Plugin

Home Page:https://getgrav.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with base_url for taxonomy

TuntematonSotilas opened this issue · comments

Hello,

I have a problem with the base_url for taxonomy :

My tags created with the admin interface are well shown on my blog page (https://gatobael.frama.site/)

But the links have no base url :

<a class="btn btn-primary" href="//tag:SF">SF</a>

Had this problem too and had to customize the partials.

I wonder why we do not use the value from the config in the example from the readme:

For now, it is like this:
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag'} %}
Whereas we could write something like

{% include 'partials/taxonomylist.html.twig' with {base_url: base_url ~ config.plugins.taxonomylist.route, taxonomy: 'tag'} %}

base_url is concatenated with route from config in case the site runs under a subfolder.

Thanks but I don't have access html (or twig) files , I have only access to the admin plugin (https://github.com/getgrav/grav-plugin-admin).
Does it exists another solution ?

The above solution works. And in my situation of multiple "blogs" or collection pages, I inserted into the frontmatter a value and then referenced it with the following:
{% include 'partials/taxonomylist.html.twig' with {base_url: base_url ~ page.header.taxonomy.route, 'taxonomy':'tag', children_only: true} %}

Edit: or you can use the current page with:
{% include 'partials/taxonomylist.html.twig' with {base_url: base_url ~ page.url, 'taxonomy':'tag', children_only: true} %}

Problem solved for me (by the admin guy of my grav)
He sets the parameter absolute_urls to true.