Noel Boss

Edit Children in place and new Pages as Children

Recommended Posts

EDIT:

What I'm actually really looking for is a way to edit and add children of a page in a similar way as RepeaterMatrix fields:

Easy to add new ones and easy to move, hide and modify inline:

1718125483_ScreenShot2018-07-12at14_39_42.thumb.png.d83c3bb0a0f49a6c4f55a9b6126d0413.png

––––

I have a problem and am so close to a solution, but everything i've found so far only gets me about 95% and before I create something on my own want to ask is anyone knows a soltion or if I miss something.

My simple requirement: Editing Children and creating new ones inside the current parent page context – eighter inline or in a Lightbox.

 

Not working Option A:

With page relation fields I can create new pages – but it requires me to select a fixed parent. If I don't provide a parent, no new link is present.

1136250840_ScreenShot2018-07-12at14_15_47.thumb.png.4cd96d190ef22e412662d171bc9292d7.png

Not working Option B:

With the awesome AdminPageFieldEditLinks Module I can create new Pages directly without the need to provide a parant beforehand – but then I need to select it at runtime.

1802494649_ScreenShot2018-07-12at14_15_29.thumb.png.0293c65c692ecc1de656d7d724bb7e92.png

There is a new link now – the link is: parent_id=0&template_id=51&modal=1 … if it only provided the correct parent_id!!!

1110464385_ScreenShot2018-07-12at14_22_25.png.67466b8211a131d8bbeca57a1649f7d5.png

But now i have to select the parent:

1751700964_ScreenShot2018-07-12at14_22_19.png.b4e6b2d0a601530d618e5d7ec5d2a0d0.png

Not working Option C :

That's what I do right now… Reordering the Child-Field to the first tab – but to maintain the context, I would need the edit and new button to open a lightbox instead of a page reload.

 

Possible solutions:

For A+B: If I could provide a selector as parent, this would solve my issue: "parent=page.id" or a checkbox "use parent page for new pages". Or I could use some hook?

For C : I could write my own javascript to open the links in a Lightbox.

 

Share this post


Link to post
Share on other sites

Why not just use PageTable field?

  • Like 1

Share this post


Link to post
Share on other sites

I tried both but these also only go about 90% – I just again tried PageTable, is what's closest so far to what I would like.

Share this post


Link to post
Share on other sites

Can you describe what is not working with Batch Child Editor or PageTable?  ie the last 10%?

Share this post


Link to post
Share on other sites

It's a fantastic module and I see its huge benefits for batch editing many children, when it's used in this context – But there are also some drawbacks for just using it as a intuitive interface to administrated some children:

– Adding new items is a multi stepp process: Add, add title, save, edit
– Backend interface is single language only (configurable using files that are not multi language)
– Columns are not configurable. I don't want to display technical infos like Template and Name to the editor at this place

Share this post


Link to post
Share on other sites

I haven't tried it inside the admin but FEEL may fit for your needs (see my sig). It doesn't have a feature to list children though. If there's a mod needed I can add that to the module, of course a PR is welcomed.

Share this post


Link to post
Share on other sites

I truly would love to have the repeatermatrix interface for children, that would be amazing. If I understand you correct @tpr, i could use feel in the backend, but then I would have to build my own input-field or use RuntimeMarkup.

Thats what I use currently, a page-table field with prefilled children:

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By creativejay
      Apologies if this has been covered. I tried a search but didn't hit the usecase I'm after.
      I currently have category pages listing their children products. Someone asked me to put a product in multiple categories, so I created a Page Reference field called prod_othercategories which lets a user pick multiple product category pages.
      When I try to output a list of products for a category page, I came around to the following selector:
      $pages->find("prod_othercategories|parent=$page, template=prod_series, sort=title, prod_status_pages!=1554|1559|1560|4242"); Only the first selector item is giving me trouble, but I'm including the entire string in case something is conflicting and I'm not realizing it.
      The output is currently only outputting matches for "parent" and ignoring prod_othercategories. I tried listing parent first in the selector but it had no effect.
      Appreciate if someone could help me with this! Thanks!
    • By blynx
      Hej,
      A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated
      (Also pull requests are appreciated 😉 - have a new Job now and don't work a lot with ProcessWire anymore, yet, feel free to contact me here or on GitHub, Im'm still "online"!)

      Modules directory: http://modules.processwire.com/modules/markup-processwire-photoswipe
      .zip download: https://github.com/blynx/MarkupProcesswirePhotoswipe/archive/master.zip
      You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method:
      <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so:
      <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe
      What do you think? Any ideas, bugs, critique, requests?
      cheers
      Steffen
    • By bystefu
      Hello,i  am new here. A hour ago i bought a vps and i want  to make a website about movies.
      - a home page
      - a movie page with title, description,  trailer ,year and actors
      -categories, tags 
      - a complex search page by name,tags,year and acts
      - posts, latest news (about site)
       
      It's already to much
      I leave wordpress,from my needs it's very complicated. So,minimal speaking, i can do that with this cms,and which is the steps? I don't know yet how this work.Thank you,and sorry for my eng.

    • By Robin S
      Some introduction...
      This module is experimental and there are probably bugs - so treat it as alpha and don't use it on production websites.
      I started on this module because there have been quite a few requests for "fake" or "invisible" parent functionality and I was curious about what is possible given that the idea sort of goes against the PW page structure philosophy. I'm not sure that I will use this module myself, just because I don't really see a long list of pages under Home (or anywhere else) as untidy or cluttered. I would tend to use Lister Pro when I want to see some set of pages as a self-contained group. But maybe others will find it useful.
      At the moment this module does not manipulate the breadcrumb menu in admin. So when you are editing or adding a virtual child the real location of the page is revealed in the breadcrumb menu. That's because I don't see the point in trying to comprehensively fool users about the real location of pages - I think it's better that they have some understanding of where the pages really are. But I'm open to feedback on this and it is possible to alter the breadcrumbs if there's a consensus that it would be better that way.
       
      Virtual Parents
      Allows pages in Page List to be grouped under a virtual parent.
      This module manipulates the page list and the flyout tree menu to make it appear that one or more pages are children of another page when in fact they are siblings of that page.
      Why would you do that instead of actually putting the child pages inside the parent? Mainly if you want to avoid adding the parent name as part of the URL. For example, suppose you have some pages that you want to be accessed at URLs directly off the site root: yourdomain.com/some-page/. But in the page list you want them to be appear under a parent for the sake of visual grouping or to declutter the page list under Home.
      Example of how the page structure actually is

      Example of how the page structure appears with Virtual Parents activated

      How it works
      This module identifies the virtual parents and virtual children by way of template. You define a single template as the virtual parent template and one or more templates as the virtual child templates. Anytime pages using the child template(s) are siblings of a page using the parent template, those child pages will appear as children of the virtual parent in the page list and tree menu.
      You will want to create dedicated templates for identifying virtual parents and virtual children and reserve them just for use with this module.
      Features
      Adjusts both page list and tree flyout menu to show the virtual parent/child structure, including the count of child pages. Works everywhere page list is used: Page List Select / Page List Select Multiple (and therefore CKEditor link dialog). Intercepts the "Add page" process in admin, so that when an attempt is made to add a child to a virtual parent, the child is added where it belongs (the next level up) and the template selection is limited to virtual child templates. Intercepts moving and sorting pages in the page list, to ensure only virtual children may be moved/sorted under the virtual parent. Superusers have a toggle switch at the bottom of the page list to easily disable/enable Virtual Parents in order to get a view of what the real page structure is. Usage
      Install the Virtual Parents module.
      In the module config, enter pairs of parent/child template names in the form virtual_parent_template=virtual_child_template. If needed you can specify multiple pipe-separated child templates: virtual_parent_template=child_template_1|child_template_2. One pair of template names per line.
      There is a checkbox in the module config to toggle Virtual Pages on and off, but it's more convenient to use this from the page list.
      Notes
      It's important to keep in mind the real location of the virtual child pages. This module is only concerned with adjusting the appearance of page list and tree menu for the sake of visual grouping and tidiness. In all other respects the virtual children are not children of the virtual parent at all.
      It's recommended to select an icon for the virtual parent template (Advanced tab) so virtual parents are marked out in the page list as being different from normal parent pages.
      Do not place real children under a virtual parent. There is some protection against this when moving pages in the page list, but when it comes to changing a page's parent via the Settings tab the only protection is common sense.
       
      https://github.com/Toutouwai/VirtualParents