Jump to content

Use ProcessProfile in the frontend


pwFoo
 Share

Recommended Posts

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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...