Custom code

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.
12/10/2010 2:55:48 AM
Gravatar
Total Posts 14

Custom code

How can I override page_load event of some page created previously, or how can I add some custom events on page?

Tnx,
great cms...

12/10/2010 3:05:48 AM
Gravatar
Total Posts 550

Re: Custom code

Hi,

There isn't physical page for CMS page in mojoportal. Can explain more what you want to do?

 

12/10/2010 3:17:12 AM
Gravatar
Total Posts 14

Re: Custom code

I wont to override event of the page that I have created with button new page. I know that all dinamic pages are in db.

12/10/2010 3:25:01 AM
Gravatar
Total Posts 550

Re: Custom code

I think it is not possible. The page load event for all cms pages is the page load event of defalt.aspx page. If you change it your changes lost when you update your local code from repository.

Hope Helps,

Asad

12/10/2010 3:38:31 AM
Gravatar
Total Posts 108
Community Expert

Re: Custom code

Asad is right, you cant change the load event of a single page, but if you need to do something specific in a page may be

javascript have a answer for you.

If you explain better what you try to achive, we can give you better ideas 

12/10/2010 5:34:27 AM
Gravatar
Total Posts 14

Re: Custom code

How do I get current page url, I allways get Default.aspx?

12/10/2010 8:47:55 AM
Gravatar
Total Posts 18439

Re: Custom code

When you build a UserControl that plugs into the page you can use the page load event of your user control.

You can get the url as it appears in the browser using Request.RawUrl or you can get the url for the current CMS page with SiteUtils.GetCurrentPageUrl()

You should review the developer documentation and training videos to learn how to work with mojoPortal and develop custom features.

Hope it helps,

Joe

12/10/2010 4:21:53 PM
Gravatar
Total Posts 14

Re: Custom code

Tnx, for very quick reply, I have found the way how to get url (with CurrentUrl) and use my logic on default.aspx.cs.

I am making a multilanguage site, from one site. I saw that you recommend one language per site (related sites mode), but I think that it is a overkill, so I have finally managed to make one site with 2 languages, I only have double pages with diferent content, and only one site. I am also thinking how to extand logic as I am developer and if I get task in future to change or add something I must manage to make it.

tnx again...

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