Map different menu items to same page

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
12/11/2007 10:07:47 AM
Gravatar
Total Posts 6

Map different menu items to same page

Hi,

 

How do you map different menu items to the same page.?

I have a menu with 2 submenu items like this:

Services
  ==> Child1
  ==> Child2
 

What I would like, is that when the user clicks on the Services menu item the Child1 page opens.

I tried entering the full URL: http://somedomainhere/Child1.aspx but this produces an error.

2007-12-09 08:58:15,015 [3100] ERROR mojoPortal.Web.Global [(null)] - /Default.aspx?pageid=67
System.ArgumentException: Could not find the sitemap node with URL 'http://somedomainhere/Default.aspx?pageid=67'.
at System.Web.UI.WebControls.SiteMapDataSource.GetNodes()
at System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath)
at System.Web.UI.WebControls.SiteMapDataSource.GetHierarchicalView(String viewPath)
at System.Web.UI.HierarchicalDataSourceControl.System.Web.UI.IHierarchicalDataSource.GetHierarchicalView(String viewPath)
at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath)
at System.Web.UI.WebControls.TreeView.DataBindNode(TreeNode node)
at System.Web.UI.WebControls.TreeView.PerformDataBinding()
at System.Web.UI.WebControls.Adapters.HierarchicalDataBoundControlAdapter.PerformDataBinding()
at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.TreeView.DataBind()
at Wintelligence.CMS.Web.UI.PageMenuControl.RenderTreeView()
at Wintelligence.CMS.Web.UI.PageMenuControl.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

12/11/2007 10:15:06 AM
Gravatar
Total Posts 18439

Re: Map different menu items to same page

Hi,

The SiteMap data source really wants urls in the sitemap to be unique.

You can make more than one friendly url map to the same site page and then use the different friendly urls but see the same content. So you can look in UrlManager and find the mapping for Child1.aspx and make the mapping for the Services.aspx page the same. ie Default.aspx?pageid=x where x will be the same for both friendly urls.

You also might try using ~/Child1.aspx instead of the full path and see if it works.

Hope it helps,

Joe

12/11/2007 11:00:25 AM
Gravatar
Total Posts 6

Re: Map different menu items to same page

Hi Joe,

 

Thanks for the reply, but these are the results:

1) use ~/Child1.aspx instead of full path

This produces the error:T

"The Url is already in use. You cannot use the same Url for different pages, unless you use the full Url with http. However, doing this will result in multiple Menu Pages pointing to the same actual page.

 

2) Find the mapping for Child1.aspx and make the mapping for the services.aspx page the same.

This WORKS!, but the addressbar in the browser is then http://<somedomain>/default.aspx?pageid=67 while I would rather see either:

- http://<somedomain>/services.aspx

- http://<somedomain>/child1.aspx 

 

Can this be tackled too?

12/11/2007 11:06:52 AM
Gravatar
Total Posts 6

Re: Map different menu items to same page

Hi Joe,

 

It works by changing it in the URL manager as you described.

I first changed in the URL properties of the page.

Thanks again.

 

3/6/2010 12:13:04 AM
Gravatar
Total Posts 3

Re: Map different menu items to same page

So where is this user mapping stored. I had a user create some pages that she didn't save correctly or deleted, and not wants to recreate them, but I get the error about page already exists.  I have checked the DB pages, and looked in root folder but don't see the pages any place, and under administartion add/edit pages they dont show up anyplace either.

Thanks

3/6/2010 6:53:33 AM
Gravatar
Total Posts 18439

Re: Map different menu items to same page

Hi,

You may need to delete the urls from Administration > Advanced Tools > Url Manager if you want to be able to re-use them. You may also need to look for them in the Advanced Tools > 301 Redirect Manager and delete them there if they are redirecting. These redirects would be created if the name of the page were changed, it would change the url and a redirect from the old url to the new one would be created.

Pages are not physical files, all the pages in the menu are served by /Default.aspx?pageid=x the friendly urls for those pages all are re-written to /Default.aspx?pageid=x but the frindly url is shown in the browser.

You might find it helpful to watch part 7 and part 8 of the developer screen casts, as it explains concepts about mojoPortal and how it works.

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

Hope it helps,

Joe

3/6/2010 9:33:35 AM
Gravatar
Total Posts 3

Re: Map different menu items to same page

Thank you, that was what I needed.

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