grav-learn icon indicating copy to clipboard operation
grav-learn copied to clipboard

Issue with "Filter taxonomies using the taxonomylist plugin" article

Open andr11b opened this issue 7 years ago • 0 comments

It seems like an issue with example in article Filter taxonomies using the taxonomylist plugin If i use variable taxonomy like it proposes in the example

{% include 'partials/taxonomylist.html.twig' with {'taxonomy':'tag', filter: true, filterstart: 0, filterend: 5} %}

i get the error message

"An exception has been thrown during the rendering of a template ("Illegal offset type in isset or empty")."

for

   {% for tax,value in taxlist[taxonomy] %}

        <a href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax|e('url') }}">{{ tax }}</a>

    {% endfor %}

or

" An exception has been thrown during the rendering of a template ("Object of class Grav\Common\Taxonomy could not be converted to string")."

if i try to display {{ taxonomy }}

After renaming everything works, as expected!

andr11b avatar Oct 12 '17 11:10 andr11b