Menu collapses on custom pages

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.
7/24/2008 1:42:27 PM
Gravatar
Total Posts 9

Menu collapses on custom pages

Yeah, its me again..

I have my custom page that I have been working on, and I have an interesting (and mildly annoying) behavior with regards to the menu. 

We are using a skin that we modified which uses the TreeView menu.   Normally when you select a page, its highlighed in the menu and the page is shown - exactly what we want.  When you navigate to my custom page, however,  the menu always collapses all open tree nodes completely. 

The only thing I can think of, is that there is some kind of menu intializer that I am not calling.  This page was built using inline code (for now, this is just for testing) and I used the example in the documentation as my basis. 

Thank you,

Tony Scharf

 

 

7/25/2008 4:54:53 AM
Gravatar
Total Posts 18439

Re: Menu collapses on custom pages

Hi Tony,

The menu knows what the current page is by the pageid=x param in the query string, however with url re-writing you don't really see the query string on content system pages. The content system pages are all virtual, they don't correspond to physical pages, they are really all server by Default.aspx.

Really, I think where you are going wrong is trying to develop a page in the first place, you should develop a UserControl inheriting from SiteModuleControl as discussed here:

http://www.mojoportal.com/overviewofcontentfeaturedevelopment.aspx

Then you can plug your feature into a content system page like any of the other features and you don't have to worry about the menu, it will just work as it should. For complex features you may need to link from your modulecontrol to external physical pages. For example on this site the Forums ModuleControl plugs into a content page but from there it links to a number of supporting physical pages like ForumThreadView.aspx etc, you can notice in the urls the reason the menu stays highlighted correctly is because the pageid is passed to the external pages in the query string.

Hope it helps,

Joe

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