Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter By Category #9

Open
daz3dpr0z opened this issue Apr 10, 2016 · 3 comments
Open

Filter By Category #9

daz3dpr0z opened this issue Apr 10, 2016 · 3 comments

Comments

@daz3dpr0z
Copy link

I have a project which has 2 blog pages.

I want to be able to filter the tag cloud so it contains just the categories relevent to the current blog page as opposed to pulling in all the tags for the site .

The problem with pulling in all the tags from the whole site is if a user clicks on a tag which is not part of the current directory tree it results in a 0 listing which would not look well on a production site and could result in a visitor getting bored and not exploring the site any further.

Thanks in advance

jimmy

@drinkharder
Copy link

Are you referring to have a list of categories and their counts on sidebar? I want to know how to do this also.

lcharette added a commit to lcharette/grav-plugin-taxonomylist that referenced this issue Apr 7, 2019
@beamaria
Copy link

beamaria commented Mar 5, 2020

Same issue here..Any solution??

@ToeiRei
Copy link

ToeiRei commented Sep 4, 2022

I'd suggest something like

<h4>Categories</h4>
<span class="categories">
        {% for tax,value in taxlist['category'] %}
        <li> <a href="{{ base_url }}/category{{ config.system.param_sep }}{{ tax|e('url') }}">{{ tax|capitalize }}</a></li>
        {% endfor %}
</span>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants