Multisite with common sitemenu

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.
4/21/2012 9:03:14 AM
Gravatar
Total Posts 42

Multisite with common sitemenu

Think I'm going to have to develop my own solution here, but thought I would check with the community first for other solutions or ideas. I have a mojoPortal installation with child sites. Each child site has it's own hostname mapping. I want to combine all the pages of the parent and child sites into one menu. The goal is to have one sitemenu that may be used across all the sites in the installation. I would render this as mega menu using some CSS that I wrote a while back. I could do it statically but that would become a pain to manage across all sites. Thoughts?

4/21/2012 2:39:42 PM
Gravatar
Total Posts 2239

Re: Multisite with common sitemenu

Hi Steve,

Yeah, I think you're correct that you would have to develop a custom solution. The menu controls all pull their menu items from the context of the current site. You might be able to use the StartingNodeUrl on the SiteMapDataSource for your menu but I don't think you can pass it a complete url and if you can, I'm not sure the SiteMapDataSource control would be able to pull in the menu items from the other site. If it can pull in the menu items, you might have a solution because then you can create a SiteMapDataSource and mojoMenu for each site and that can be done programmatically.

I'm interested to know how you make out with it though, it's an interesting concept.

Thanks,
Joe D.

4/21/2012 2:56:17 PM
Gravatar
Total Posts 42

Re: Multisite with common sitemenu

Thanks Joe D.

You're thinking was along the same path as mine. My plan is to get a collection of all site ids for the menu (not all the sites in the single installation would be included), their hostnames, then try to create the mojo menu. I will let you know how it goes. For now until I can get some development time I'm going to have to do a static menu.

4/23/2012 6:55:51 AM
Gravatar
Total Posts 18439

Re: Multisite with common sitemenu

You'll need to dynamically create the sitemap data sources (using the siteids) and menus. You'd need to use a different menu for each site and just stack them in the page since a menu can only bind to one sitemapdatasource. The challenging part will be if not all the pages are public, you can filter the current site using the user's role cookie (or lack thereof) but you can't filter for other sites that way. Probably the simplest approach is to only show the ones with view roles = "All Users;"

I think trying to show the menus for multiple sites all on one page would be kind of a mess  unless each of the sites doesn't have that many pages. If the sites are really that related to want to show on the same menu I wonder if separate host names should have been used at all, visual partitioning might have been a better way to make the appearance of separate sites but still really have just one, then site search would work for all of them as well.

Hope that helps,

Joe

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