adding a max_count for a child page?
See original GitHub issueI would like the ability to have the max_count on a specific child.
for example i have a Page with child pages, each of the child pages can have 1 detail page of their own and many other types of pages.
here is an example of what i mean. Apologies if its difficult to understand what im trying to ask.
class MainPage(PagePlus):
text = RichTextField()
content_panels = Page.content_panels + [
FieldPanel('text'),
]
parent_page_types = ['HomePage']
class DetailPage(PagePlus):
pass
parent_page_types = ['MainPage']
max_count_per_child = 1 <<<<<<<<<<<<<<<<<<<<<
class AnotherPage(Page):
pass
parent_page_types = ['MainPage']
now in the CMS it would work similarly to the newly added max_count, but only allow 1 detail page per child created. currently if i added the max_count it would allow me to make 1 detail page accross all the child pages, but i would like 1 detail page per child page.
Just a possible addition that could help in some specific cases.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Wagtail CMS: Restricting Parent and Child Page Types
When you start to create several different page types in Wagtail and you create a child page (a page that's nested under a...
Read more >Insert the children display macro | Confluence Cloud
Use the Children Display macro to insert a list of a page's child pages, and their descendants. This is useful, for example, if...
Read more >display specific top level and child pages in wordpress
When on Page 1, I want to show Page 1 and all the child pages below on a menu, when on a child...
Read more >How to Create a Child Page in WordPress - WPBeginner
To create a child page, you first need a parent page. You can use any page as a parent, or create a new...
Read more >Max Input Vars – Uncode Theme
The PHP Max Input Vars is the maximum number of variables your server can use for a single function. To work properly with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not at all! glad you got it working, will be using your work once its live! 😉
I hope I didn’t take the work from you, but I really wanted to try this out!