Supporting page menu selection

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/17/2009 3:45:19 PM
Gravatar
Total Posts 190

Supporting page menu selection

This one should be easy. I have a custom feature module that I've added to a page in the CMS. The feature has a supporting page that inherits mojoBasePage and so far so good. I did figure out that "CurrentPage.ShowBreadcrumbs = true;" will show the breadcrumb control. But I'm wondering what is the correct way to set the page title, have to title append to the breadcrumb trail and have this page hilite the same main menu navigation item as the page displaying the feature module. I've looked at some of the existing mojo features but I'm not seeing the answer.

Thanks,

John

11/17/2009 3:50:45 PM
Gravatar
Total Posts 18439

Re: Supporting page menu selection

Hi John,

You should pass in the page id to your supporting page(s) in the query string with pageid=x and the module id as mid (just to be consistent with other features). With the pageid in the query string the menu and breadcrumbs will reflect the page correctly.

Best,

Joe

11/17/2009 3:52:25 PM
Gravatar
Total Posts 190

Re: Supporting page menu selection

Aha, I did not see that. Thanks Joe.

11/17/2009 4:22:48 PM
Gravatar
Total Posts 190

Re: Supporting page menu selection

Oops. Almost, but not quite. If I pass in those parameters the correct nav is hilited, but the name in the breadcrumb is not really what I was hoping for. Is there a property or method in mojoPortal to set the page title that will also append that name to the breadcrumb rather than displaying the parent page name?

11/17/2009 4:31:15 PM
Gravatar
Total Posts 18439

Re: Supporting page menu selection

Here is a code fragment from WebStore feature that shows how to add extra links into the breadcrumb links, this one adds 2 links.

Control c = Master.FindControl("Breadcrumbs");

if (c != null)

{

BreadcrumbsControl crumbs = (BreadcrumbsControl)c;

crumbs.ForceShowBreadcrumbs = true;

crumbs.AddedCrumbs = "<a href='"

+ SiteRoot + "/WebStore/AdminDashboard.aspx?pageid=" + pageId.ToInvariantString() + "&amp;mid=" + moduleId.ToInvariantString()

+ "'>" + WebStoreResources.StoreManagerLink

+ "</a>&nbsp;&gt;&nbsp;<a href='"

+ SiteRoot + "/WebStore/AdminDiscounts.aspx?pageid=" + pageId.ToInvariantString() + "&amp;mid=" + moduleId.ToInvariantString()

+ "'>" + WebStoreResources.DiscountAdministration

+ "</a>";

}

Hope it helps,

Joe

11/18/2009 9:44:08 AM
Gravatar
Total Posts 190

Re: Supporting page menu selection

This should do the trick. I just wanted to make sure I wasn't missing some built in portal methods that might have already been there to handle the things I want to do. Thanks again.

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