Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Contribution List Save View modes: 
User avatar
jaykzoo-yahoo - 5/26/2010 10:23:59 AM
Contribution List Save
I'm using a Contribution List, and when i Save, it stays on the document i just saved.

I would like it to either start a new document, or go to the list of documents. Is there any way to accomplish this through the interface, or would I have to customize the web part?

Also, is there anyway to group the list of documents in the contribution list?


User avatar
kentico_pavelk - 6/2/2010 3:43:54 AM
RE:Contribution List Save

You can hide the form by modifying <your project>\CMSAdminControls\UserContributions\ContributionList.ascx.cs file like this:

1) In Page_Load method register editDoc's OnAfterSave method:
editDoc.CMSForm.OnAfterSave += new CMS.FormControls.CMSForm.OnAfterSaveEventHandler(OnAfterSave);

2) Add OnAfterSave method to the file:
public void OnAfterSave()
// create a flag that indicates that a new document has been created here

3) Override OnPreRender method:
protected override void OnPreRender(EventArgs e)
// if the flag indicates new document, call following code:
pnlList.Visible = true;
pnlEdit.Visible = false;
editDoc.NodeID = 0;
// remove the flag


Basically, you create a flag in OnAfterSave method that indicates that the new document has been created and the form should be hidden. In OnPreRender method, you can hide the form and remove the flag.

Best regards,
Pavel Knotek