PageSettingsSaved.ashx

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/18/2012 3:09:40 AM
Gravatar
Total Posts 32

PageSettingsSaved.ashx

Hi,

I'm trying to change the redirect part after a new page is created: I refer to the following code in PageSettingsSaved.ashx.cs

if (!String.IsNullOrEmpty(pageIsNewlyCreated) && Convert.ToBoolean(pageIsNewlyCreated))             

{                 //specify any page creation redirection here.                

context.Response.Redirect(String.Format("PageSettings.aspx?pageid={0}", pageId));             }            

else            

{                 context.Response.Redirect(String.Format("PageSettings.aspx?pageid={0}", pageId));             }

In the first part we can specify another url, right? but this would be changing the mojoportal code, and we have do compile and create another mojoportal.web.dll (I think its this one, I do not have the code with me). Is there another way of doing this?

Thanks for your help.

Regards.

Lynton

 

 

 

6/18/2012 6:10:38 AM
Gravatar
Total Posts 18439

Re: PageSettingsSaved.ashx

As it says in the comments of that file:

 /// <summary>
    /// This Handler enables you to take control of screen navigation once a page is saved.
    /// To do this, create  your own page in your own Visual Studio project
    /// and transfer into the admin folder via a post build event. 

    /// Leaving the code as it is, the navigation will just redirect back to the PageSettings page, but you could
    /// actually direct the user to anywhere you like.
    /// </summary>    

You should not modify mojoportal code, but in special cases you can replace an existing file with a custom file. But once you do that it is up to you to maintain the file you replaced during upgrades and understand any implications of doing it.

So in this case you could replace the .ashx file with a custom one that inherits from your own dll or using inline code. Doing that kind of thing is up to you, it is not something I personally recommend doing. This .ashx file was added at the request of someone in the community to solve something he needed to do, it was not my idea. Replace files at your own risk based on your own knowledge and decisions. Doing things like that is right on the edge of forking the code but not quite as bad as truly forking the code when you keep it limited to something you can maintain while still upgrading to new versions of mojoPortal.

6/18/2012 9:33:18 AM
Gravatar
Total Posts 32

Re: PageSettingsSaved.ashx

Thanks for your speedy reply Joe.

You must sign in to post in the forums. This thread is closed to new posts.