AnsweredAssumed Answered

Customizing navigation history/redirects on Share pages

Question asked by mkolas on Mar 6, 2015
I am trying to customize the existing edit-metadata page in Share in order to remove the default redirection that occurs when the user finishes editing properties. Out of the box, Share will redirect the user to their last known location- whether that is the Document Library, Document Details, etc.

Our scenario is that we want to have a link to a edit-metadata page on workflow forms so that users can modify properties on a separate node while they fill out their workflow task. However, once they click Task Done on the workflow form, they get redirected to the edit-metadata page since it was their "last location" in Share. I'd like to remove that edit-metadata page from the navigational history to prevent this from happening. Alternatively, we could open the edit-metadata page in a new window entirely and close the page on Save. I'm not necessarily married to either approach.

My approach so far as been to copy the existing edit-metadata page, with the intention of making a small javascript change wherever the Submit button functionality is written. However… I don't see anywhere in the code where I can customize how these redirects are stored or how the navigational history is determined!

I've mostly been poking around in form.js since that's where the buttons are created, but I don't see any navigation-related code in any of the Alfresco.util.createYUIButton calls… this leads me to believe that this might be handled at a much higher level than on specific pages. I've done a lot of grepping through the Share code for terms like 'navigation' or 'breadcrumb' or 'redirect' but unfortunately have not been able to figure out how to hack into this. There's a function alfPublish() that seems to manage breadcrumbs of some sort but I can't seem to find any documentation on how that works.

I feel like this shouldn't be an overly complicated customization.. does anyone have any ideas where I can customize the default form behaviour?