Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

has_children on categories #1726

Closed
1 task done
robsonsobral opened this issue Jan 14, 2022 · 0 comments · Fixed by #1727
Closed
1 task done

has_children on categories #1726

robsonsobral opened this issue Jan 14, 2022 · 0 comments · Fixed by #1727
Labels
enhancement New feature or request

Comments

@robsonsobral
Copy link
Contributor

robsonsobral commented Jan 14, 2022

Is your feature request related to a problem? Please describe.

We can find the categories which has parents, but not the ones which are parents.

A sample of the code I need:

{exp:channel:categories channel="news" style="nested" show_empty="no"}
    <a href="{path='channel/index'}">{category_name}</a>

    {if has_children}
        <button
            type="button"
            aria-haspopup="true"
        >children categories</button>
    {/if}
{/exp:channel:categories}

Describe the solution you'd like

We could have a has_children conditional on exp:category_archive and exp:categories.

Describe alternatives you've considered

The only other solution is to use custom queries.

  • I am capable and would like to work on implementation of this feature if it is considered.
@ops-andy ops-andy added the enhancement New feature or request label Jan 18, 2022
intoeetive added a commit that referenced this issue Aug 17, 2022
Added has_children variable to category tags, #1726
@ExpressionEngine ExpressionEngine locked and limited conversation to collaborators Feb 15, 2023
@intoeetive intoeetive converted this issue into discussion #2968 Feb 15, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants