-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add recursive variants of .Pages and .RegularPages #6411
Comments
|
Here are few common uses of "recurse" .. |
Yes, it's pretty good, I'll admit that. And it's certainly shorter than the "where clause" needed today. |
So even though it might not be 100% acurate to what we’re trying to achieve here what about .AllRegularPages For me recursive is about function calling themselves but here we just want to a flat list of the tree’s leaves right? There is slight possibility that this brings confusion with the existing site.AllPages which serves a different purpose (cross languages) but I’d take that risk. |
some more ideas: In any case, would you then skip the Sub-Sections themselves from the result ? They can be accessed via the resulting Page anyway. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Currently when you do
.Pages
or.RegularPages
, you the pages in the current section, one level deep.But having a flat view of all the pages below a section (e.g.
blog
) is a common requirement, which in its simplest form isn't hard to do (most people dowhere .Site.RegularPages "Section" "blog"
or something). But it gets non-trivial fast.With the work I'm doing in this area, adding some simple-to-use methods for the above would be trivial.
The hard part is the naming, so please help.
Given the home page,
.PagesAll
==.Site.Pages
.RegularPagesAll
==.Site.RegularPages
$blog.RegularPagesAll
will give all regular pages in and below/blog
..RegularPagesAll
is obviously not a good name, which is where I need some help./cc @regisphilibert @kaushalmodi
The text was updated successfully, but these errors were encountered: