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

[4.x] Add children tag #8990

Merged
merged 6 commits into from Dec 7, 2023
Merged

Conversation

ryanmitchell
Copy link
Contributor

@ryanmitchell ryanmitchell commented Nov 14, 2023

Sometimes you want to get and loop over the children of the current page, for example to show an inline sub-nav. You can do this with the right combination of params on the {{ nav }} tag but given there is a {{ parent }} tag, people might expect an equivalent {{ children }} tag.

Closes #5567

@jasonvarga
Copy link
Member

jasonvarga commented Nov 14, 2023

Neat! Need to double check that this doesn't interfere with the children variable when inside a nav tag.

@ryanmitchell
Copy link
Contributor Author

@jasonvarga added a test for that

Copy link
Member

@duncanmcclean duncanmcclean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working great for me.

@jasonvarga jasonvarga changed the title [4.x] Add {{ children }} tag [4.x] Add children tag Dec 7, 2023
@jasonvarga jasonvarga merged commit 45bf2a1 into statamic:4.x Dec 7, 2023
19 checks passed
@ryanmitchell ryanmitchell deleted the feature/children-tag branch December 8, 2023 09:21
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

Successfully merging this pull request may close these issues.

Children tag pair doesn't return as expected
3 participants