User form creates a new page? (Thanks in advance!)
Permalink
Hi everyone!
You know how easy it is to create pages as administrator? I want users to be able to do just that.
Ideally, a user fills out a very similar form (ie. mydomain.com/form) and has the same options as an admin (ie. Page Title: "cats and dogs" and "mydomain.com/cats-and-dogs" is assumed). Once the form is submitted, users can comment on the new page.
Seems simple, but I seem to have hit a wall.
Warm regards,
-Mai
You know how easy it is to create pages as administrator? I want users to be able to do just that.
Ideally, a user fills out a very similar form (ie. mydomain.com/form) and has the same options as an admin (ie. Page Title: "cats and dogs" and "mydomain.com/cats-and-dogs" is assumed). Once the form is submitted, users can comment on the new page.
Seems simple, but I seem to have hit a wall.
Warm regards,
-Mai
I don't think there's a simple way to achieve what you want. You could turn on advanced permissions and grant permission for creating pages to your group of logged-in users (also think about if you want them to be able to access the file manager so they can add pictures to the page, or the sitemap if they want to be able to choose pages that hyperlinks in their content should link to).
As for requiring certain fields ("properties"), I don't think there's any way in C5 to make them required.
To build out this functionality exactly as you want, I think you would need to build it yourself as a single_page that had the desired fields and included validation to ensure they were required, and then had code on the backend to create the new C5 page and then redirect the user to it.
As for requiring certain fields ("properties"), I don't think there's any way in C5 to make them required.
To build out this functionality exactly as you want, I think you would need to build it yourself as a single_page that had the desired fields and included validation to ensure they were required, and then had code on the backend to create the new C5 page and then redirect the user to it.
Thanks for your help!
I've been toying around with advanced permissions, trying to exclude the "Edit Mode" button for users (while keeping "Add Page").
Then, when "Add Page" is clicked by a user, they have the same options, less "page type" (default assumed) and maybe I'd rename a couple of fields.
So my question now is, where is the source code for the "Add Page" window?
Warm regards,
-Mai
I've been toying around with advanced permissions, trying to exclude the "Edit Mode" button for users (while keeping "Add Page").
Then, when "Add Page" is clicked by a user, they have the same options, less "page type" (default assumed) and maybe I'd rename a couple of fields.
So my question now is, where is the source code for the "Add Page" window?
Warm regards,
-Mai
I unfortunately don't have an answer for you (I've never needed to use advanced permissions myself so I'm not very familiar with how it works).
As for the code the handles the editing, it's strewn about in various system files. The concrete/startup/process.php is usually the starting point for cms actions. Your best bet is to fire up a debugger and step through the code.
Best of luck,
Jordan
As for the code the handles the editing, it's strewn about in various system files. The concrete/startup/process.php is usually the starting point for cms actions. Your best bet is to fire up a debugger and step through the code.
Best of luck,
Jordan
Thanks,
-Mai