You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a page is of type modular, the method Page.children() also lists all invisible module-pages. Page.collection() on the other hand correctly lists only the module-pages and not child-pages.
Expected behaviour:
I would expect Page.children() to only list the child-pages (visible + invisible), excluding invisible module pages.
I could use 'Page.children.visible()', to exclude module-pages. But what if I want to list all child-pages, visible + invisible?
Suggestion:
If behaviour of 'Page.children()' is as expected, then maybe the documentation could make this more clear.
Add parameter 'excludeModules=false' to 'Page.children()' to only list visible + invisible child-pages.
The text was updated successfully, but these errors were encountered:
These are really two different things. .children() is used to get all page children, which you can further filter by appending .visible() etc to the call.
.collection() is a method that takes the filters and options set in the page's frontmatter into account.
Current behaviour:
When a page is of type modular, the method
Page.children()
also lists all invisible module-pages.Page.collection()
on the other hand correctly lists only the module-pages and not child-pages.Expected behaviour:
I would expect
Page.children()
to only list the child-pages (visible + invisible), excluding invisible module pages.I could use 'Page.children.visible()', to exclude module-pages. But what if I want to list all child-pages, visible + invisible?
Suggestion:
The text was updated successfully, but these errors were encountered: