Get List of Modules from SiteMapNode

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.
5/24/2011 4:41:20 PM
Gravatar
Total Posts 8

Get List of Modules from SiteMapNode

Hi!

I have just started developing a custom control for Mojo, and I'm full of silly and stupid questions. For now, my control is traversing through the sitemap, and I can't figure out how to get the mojoBasePage class for each SiteMapNode so that I can ultimately get a list of its modules.

Thanks!

5/25/2011 1:16:19 PM
Gravatar
Total Posts 18439

Re: Get List of Modules from SiteMapNode

The SiteMap is primarily designed for binding to the menu controls. I would not use it for the purposes you are trying to use it for.

We don't load all the modules for the whole site into memory, we only load the modules for the current requested page.

There are business classes and methods for retrieving the page modules by passing in the page id, but I certainly would not be calling those methods in a loop while iterating over the site map.

mojoBasePage is a base class for .aspx pages, it is web UI code, it is not a business object, we have mojoPortal.Business.PageSettings class as the business object that reperesents CMS pages.

using mojoPortal.Business.WebHelpers;

PageSettings currentPage = CacheHelper.GetCurrentPage() load the current page and its modules.

Hope that helps,

Joe

5/25/2011 2:50:44 PM
Gravatar
Total Posts 8

Re: Get List of Modules from SiteMapNode

That definitely helps. I hadn't realized that PageSettings was the business object.

Thanks!

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