pwFoo Posted October 9, 2014 Share Posted October 9, 2014 Hi, I would use ProcessProfile core module in the fronted that way. if (!$user->isGuest() && $input->urlSegment1 == 'edit') { echo $modules->get('ProcessProfile')->execute(); } Problem is the form action, because after send the form the url segment "edit" is missing. To get it work I have to change the following line (ProcessProfile line 58). // changed $form->attr('action', './'); $form->attr('action', ''); Is there a way to do this without modify a core module? Would be great to make such modules (ProcessProfile, ProcessLogin, ProcessPageEdit, ProcessPageAdd) more flexible for usage in the site frontend. Link to comment Share on other sites More sharing options...
kongondo Posted October 9, 2014 Share Posted October 9, 2014 I could be wrong, but the answer you will most likely get are that those modules were never really meant to be used in the frontend . Process modules are meant to run in PW admin for various reasons. If your goal is to avoid certain users from accessing the admin, there are various examples in the forums on how that can be achieved including Fredi, etc. Link to comment Share on other sites More sharing options...
pwFoo Posted October 9, 2014 Author Share Posted October 9, 2014 I'll write a edit profile module myself if there is no way to get it work, but would be great to use a existing core module Link to comment Share on other sites More sharing options...
pwFoo Posted October 10, 2014 Author Share Posted October 10, 2014 I could be wrong, but the answer you will most likely get are that those modules were never really meant to be used in the frontend . Process modules are meant to run in PW admin for various reasons. I know and understand it, but if modules work with minor tweaks also in the frontend... why reinvent the wheel and duplicate such modules? If form action would be changed or configurable the module would work for both. Backend and frontend. How ever. Because it sounds there is no need for the mentioned change I have to build me a solution (based on FormHelper and FrontendContentManager modules it should be done with some lines of code)... 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