Add custom page to site map

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.
1/12/2010 7:36:28 AM
Gravatar
Total Posts 11

Add custom page to site map

This might have been asked already, but I can't seem to find the answer.

Is there a way that I can add my custom pages I develop to the site map so that the menu context will be set correctly when visiting the custom page?

1/12/2010 8:54:10 AM
Gravatar
Total Posts 72

Re: Add custom page to site map

I'm sure you have a good reason for this but perhaps you could clarify why you don't want to create the page using the mojoPortal CMS?

If you have additional logic on these pages, why not consider creating a new feature for mojoPortal, it's quite a simple process.

Hope this helps.

Ben

1/13/2010 6:05:24 AM
Gravatar
Total Posts 18439

Re: Add custom page to site map

It is generally better to implement custom features such that they can plug into CMS pages (which are virtual and do not correspond to files on disk). However if your page inherits from mojoBasePage and uses the same skin/master page, it can work under some conditions. If you put the physical page in the root and then create a CMS page and set the url to ~/yourcustompage.aspx it will give you a warning about it being an existing file but it will let you do it. Whether it highlights the menu correctly may vary by skin and menu structure. If it is root level page in the menu it seems to work but a child page in a sub menu doesn't always work.

The way the menus knows which is the current page for CMS pages is based on the page id passed in the url. CMS pages that don't point to physical files have the friendly url re-written to Default.aspx?pageid=x and this is how the menu knows what the current page is even though the friendly url is what the user sees. There is some extra logic to try and find the correct page to highlight when it is not a normal CMS page but it is not perfect. mojoPortal is really designed for the CMS pages to be virtual not physical pages so you are working against the grain in trying to plug in physical .aspx pages.

Hope it helps,

Joe

1/13/2010 8:11:33 AM
Gravatar
Total Posts 11

Re: Add custom page to site map

Thank you for your input.

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