Vineet Sawant Posted July 8, 2013 Share Posted July 8, 2013 Hello, Alright, so this might be a really dumb question but I must know if its posible. What I need is, whenever I'm creating a new page, the new page should besides title, also ask for a pagefield that I've already added to the template. When I give it a page and press submit, on the next window where I've to input the data for that template's custom fields, the window will show some special code from the already selected page, or may it'll just perform a predefined action on the selected page. Is it really possible? Thank you. Link to comment Share on other sites More sharing options...
ryan Posted July 11, 2013 Share Posted July 11, 2013 What I need is, whenever I'm creating a new page, the new page should besides title, also ask for a pagefield that I've already added to the template. You have a couple of options here. First would be to make it a "global" field, which should make it appear on the first screen when adding a page. But not all fields support that, like files, images and repeaters for instance. The other option would be to copy /wire/modules/Process/ProcessPageAdd/ into /site/modules/Process/ProcessPageAddCustom/ and rename the file name/class name consistent with the directory name (ProcessPageAddCustom). Modify the module to do exactly what you want. In the admin, edit the page Admin > Pages > Add Page. Change the "process" field to be your custom version. When I give it a page and press submit, on the next window where I've to input the data for that template's custom fields, the window will show some special code from the already selected page, or may it'll just perform a predefined action on the selected page. Anything is possible, but this might be too abstract/vague of a request to provide a tangible answer. But it does potentially sound like you want a hook, or a custom Fieldtype or Inputfield to perform some automated actions. 2 Link to comment Share on other sites More sharing options...
kongondo Posted July 11, 2013 Share Posted July 11, 2013 This is amazing flexibility! @Vineet, I must admit I like the questions you ask; in most cases they lead to profound revelations/responses such as the one Ryan has just given.. 1 Link to comment Share on other sites More sharing options...
Vineet Sawant Posted July 11, 2013 Author Share Posted July 11, 2013 Thanks a lot Ryan. Such a flexibility ProcessWire has! The other option would be to copy /wire/modules/Process/ProcessPageAdd/ into /site/modules/Process/ProcessPageAddCustom/ and rename the file name/class name consistent with the directory name (ProcessPageAddCustom). Modify the module to do exactly what you want. In the admin, edit the page Admin > Pages > Add Page. Change the "process" field to be your custom version. I've never tried anything like that before with ProcessWire but I'd give it a try. @kongondo I'm glad you feel so. I believe, for many people here, my questions are just like baby questions I'm just learning to walk with ProcessWire, really grateful that community is holding my hands tight. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now