khorvat
10/14/2011 8:23:04 AM
Hi,
basically MonoX menus are used for MonoX page navigation and more general purposes. Therefore "other" modules aren't integrated in it. To get exactly the scenario you want you need to use NewsMenu module (it will show only the news categories) which will filter news article by selected category.
As for the above implementation everything can be done without the MonoX source code and unfortunately we can't cover every MonoX customization aspect with tutorial and full source code samples. That's why we are trying to provide you with a good support and guidance.
Let me try to summarize why you need to do to get this working:
1. Inherit from the
MonoSoftware.MonoX.ModuleGallery.MonoXMenuSimple
2.Override the
OnInit and use this code to attach to event mentioned by Vlatko
base.NavigationMenuRendered += new EventHandler<NavigationEventArgs>(MonoXMenuSimple_NavigationMenuRendered);
3. Add the following code to the
NavigationMenuRender
void MonoXMenuSimple_NavigationMenuRendered(object sender, NavigationEventArgs e)
{
if (e.NavigationMenuItem.Url.EndsWith("YouCustomUrl"))
{
Guid catId = MonoSoftware.MonoX.Repositories.NewsRepository.GetInstance().GetCategoryId("YourCategoryName");
e.NavigationMenuItem.Url = e.NavigationMenuItem.Url.Append(UrlParams.NewsCategoryId, catId);
}
}
4. Done forget to change the
Inherits attribute in the
MonoXMenuSimple mark-up file to point to your implementation.
Let us know if you need anything else.
Regards
This content has not been rated yet.
12281
Reputation
1678
Total posts