Jump to content

Page Field Edit Links


Recommended Posts

I really like this module and it works great.
Would it be possible to have an option to create new pages without inserting the title and selecting the template each time?
So if I select a template in the field settings and the title field in that template is set to hidden and not required, it would directly open the modal to edit the page, when I click new.

Iam currently using a page field in a repeater matrix field to create reusable pages for a certain parent (sort of like how pagetable is doing it natively), but its not intuitive to type in a title and hit publish each time.

EDIT:
I solved this by changing the setting "name format for children" in the family tab on the parent template (under where the pages are created) and defining a template for the children. That skips the title and template screen, when adding new pages with the page field. Nice!

It would be awesome if the new page gets automatically selected after closing the modal. I think that would be more user friendly, because usually you want to select the page you just created right?

Link to comment
Share on other sites

Reading the whole thread I now understand that the option to auto select the new page is already implemented.
However, for me this is not working. I have the page reference field inside a repeater matrix field.

When I create a new page, save and close the modal, the new page is not selected.
Is there something that Iam missing?

EDIT:
It works with page auto complete. This is fine for my use case, but it wasn't clear that ist not working with the other options. Maybe this could be added to the module description.

Link to comment
Share on other sites

  • 1 month later...
On 9/26/2019 at 12:25 PM, jploch said:

Reading the whole thread I now understand that the option to auto select the new page is already implemented.
However, for me this is not working. I have the page reference field inside a repeater matrix field.

When I create a new page, save and close the modal, the new page is not selected.
Is there something that Iam missing?

EDIT:
It works with page auto complete. This is fine for my use case, but it wasn't clear that ist not working with the other options. Maybe this could be added to the module description.

Hi jploch,

Sorry I missed this before. Which input field(s) is the auto-select not working for? Also, which PW version and admin theme are you using?

Glad you're finding the module useful!

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

First of all: great module! Is there any way to make it work with "locked" page fields? I have a field called linking_pages that is populated through the ConnectPageFields module for authors, tags etc. and is aiming at providing users a quick overview over relations between pages.

I would love to also offer users the possibility to view or edit a page through a modal directly from the field without being able to directly interact with the linking_pages field as this field is only meant to reflect the relations but not change them directly.

  • Like 1
Link to comment
Share on other sites

2 hours ago, snck said:

First of all: great module! Is there any way to make it work with "disabled" page fields? I have a field called linking_pages that is populated through the ConnectPageFields module for authors, tags etc. and is aiming at providing users a quick overview over relations between pages.

You mean when you set the inputfield’s visibility to “Locked”? Because I’m gonna open a pull request for that later when I get home ?

Link to comment
Share on other sites

36 minutes ago, Jan Romero said:

You mean when you set the inputfield’s visibility to “Locked”? Because I’m gonna open a pull request for that later when I get home ?

Yes, I mean "Locked". ? Thank you!

Link to comment
Share on other sites

@snck Maybe you want take my fork for a spin: https://github.com/JanRomero/AdminPageFieldEditLinks

I’ve only done rudimentary tests, but those seemed fine. It just adds a span around the locked inputfield’s value that tells the module’s javascript part what to do.

edit: the fork is gone since @thetuningspoon was so kind as to merge the changes. please blame me if I broke anything!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 6 months later...

Hi thanks for the module,

It 's seems the permission issue mentioned earlier (if user doesn't have an edit permission error messages show up in the modal window) is still there.

It would be great if the create button would be permissions aware and not been displayed if user doesn't have the edit rigths. Is this something that can be added at some point ? Thanks

Link to comment
Share on other sites

  • 3 weeks later...

I've been using this module successfully for a long time, but have just come across one issue. On older versions of IOS, the modal box can extend beyond the screen and not all be viewable. In particular, the "Save" button is not accessible. Is there any way I can put a save button at the top of the modal?

Link to comment
Share on other sites

  • 2 weeks later...
On 10/24/2020 at 10:29 AM, antpre said:

Hi thanks for the module,

It 's seems the permission issue mentioned earlier (if user doesn't have an edit permission error messages show up in the modal window) is still there.

It would be great if the create button would be permissions aware and not been displayed if user doesn't have the edit rigths. Is this something that can be added at some point ? Thanks

Hi @antpre. Making the module permissions-aware may be possible, but it would be a bit tricky since it would involve hooking the markup for each of the inputfield option types and injecting a data attribute to signify whether the page is editable/addable. If I get some free time I will see if this is possible.

 

On 11/12/2020 at 9:54 AM, MarkE said:

I've been using this module successfully for a long time, but have just come across one issue. On older versions of IOS, the modal box can extend beyond the screen and not all be viewable. In particular, the "Save" button is not accessible. Is there any way I can put a save button at the top of the modal?

This sounds like it would be an issue with any modal window in the back end. Unfortunately, iframes are basically unusable on iOS. On all of my sites that use iframe modals, I use browser detection to disable them on iOS.

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

Great workhorse module. Particularly useful with ConnectPageFields. I have a similar question to the permissions matter. I don’t want certain users to add or remove links (i.e. the page field itself), so I have given that role view-only access. However I do want the user to be able to view the linked page. But that seems to only be possible if they have edit access to the field. Am I missing something, or do I need to write some code to fix this?

Link to comment
Share on other sites

22 hours ago, MarkE said:

Great workhorse module. Particularly useful with ConnectPageFields. I have a similar question to the permissions matter. I don’t want certain users to add or remove links (i.e. the page field itself), so I have given that role view-only access. However I do want the user to be able to view the linked page. But that seems to only be possible if they have edit access to the field. Am I missing something, or do I need to write some code to fix this?

Glad you're finding it useful! You are correct--I don't believe I ever added support for the read-only state of the various inputfields. Feel free to submit a pull request if you do work on this.

  • Like 1
Link to comment
Share on other sites

On 6/8/2021 at 8:09 PM, thetuningspoon said:

I don't believe I ever added support for the read-only state of the various inputfields. Feel free to submit a pull request if you do work on this.

Actually I think that @Jan Romero's fix would address the problem, as I could just lock the field rather than restict access. However, it seems to me that fix only works for single, not multiple, pages. I'll take a closer look...

  • Like 1
Link to comment
Share on other sites

4 hours ago, MarkE said:

I'll take a closer look...

Hi @thetuningspoon. I have done a hack to display the edit links for multi-page situations where the field is locked. I've also added a quick module config to display edits in modal or as a new page - ideally this would be on a per-template basis. I'll do a fork once I am happy with testing.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
  • 8 months later...
26 minutes ago, adrian said:

Hi @thetuningspoon - I just noticed this: https://github.com/processwire/processwire-issues/issues/1599

Looks like this module needs to adjust how it inserts itself when a field is Locked. Please let me know if you have any problems reproducing.

Are you on the latest version? That looks very similar to the error I mentioned above.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Hi,
I updated recently both PW version (to current dev 3.0.233) and module (from 3.1.2 to 3.1.5). I have a problem with interference within FormBuilder module. When I click to edit some PageFields, in my form, I get this message. Not for all fields though. And I don't have this issue in template, view and add new links works fine.
image.thumb.png.46c3e325fb5e2923dd5e6e9c3b98fe49.png

Thanks.
(I post here, since it seems related to this module, but I could transfer the message in FormBuilder forum if necessary).

Link to comment
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
×
×
  • Create New...