Page Menu URL with request variables

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.
11/12/2009 10:54:05 AM
Gravatar
Total Posts 10

Page Menu URL with request variables

Mojo Portal 2.2.8.1
Firebird SQL

How can you have a new page  request an alternate URL other than the generated URL that is based on the title?

Case:  I want to use this URL when the menu item is clicked  "~/reports.aspx?reportID=1"

When I use the "~/reports.aspx"  by itself, it works fine. But add the additional request string info...and Mojo rejects the URL.

Can I use a URL with request variables? Is there another way to do this?

 

Many thanks.

 

11/12/2009 11:43:50 AM
Gravatar
Total Posts 18439

Re: Page Menu URL with request variables

You should not try to implement that directly in the CMS page, if you are implementing a reports feature of some kind you should implement supporting pages that can use your parameters. For example the SiteModuleControl part (this is the part of the feature that lives on a cms page) of your reports feature could be just a list of reports, you can do ajax paging in it so that it does not change the url or need to use the url. Then from the list you link to your supporting page(s) and pass in the moduleid and pageid as well as your specific params like reportid.

Notice that is exactly how the forums work, the part that is on a CMS page is just a list of forums on the page http://www.mojoportal.com/forums.aspx and from there it links to supporting pages.

Things that plug directly into the CMS pages need to be able to behave well even when other things are also on the same page, so query string params and postbacks can be problematic. You can do postbacks in a SiteModuleControl but to avoid troubles for other features on a page it should redirect out of postback after completing the postback logic or else use an ajax postback al la UpdatePanel or other ajax techniques.

So from your list you might link to an actual physical supporting page like ReportDetail.aspx and pass in all the needed params.

You supporting pages should inherit from mojoBasePage so you can have the same skinning applied and can take advantage of methods in the base page for validating security. If you look at the code for existing features you will get the idea.

Hope it helps,

Joe

11/12/2009 11:53:42 AM
Gravatar
Total Posts 10

Re: Page Menu URL with request variables

Joe,

Thanks for your help and your great portal code.

ncphares

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