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.
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.
Hi All,
Anyone know a quick and dirty way to get the PageName property of the current page's parent page?
Thanks,
John
OK, I'm sorry. This is basic .NET stuff.
SiteMap.CurrentNode.ParentNode.Title
This is along the same topic so I'll just add it here. Is there an easy way to get the level of the current siteMapNode without a looping and counting?
Thanks again
I'm just going by memory but I think SiteMapNode has a .Depth property
Hope it helps,
Joe
I did see a currentPage.DepthIndicator property, but it doesn't have any value. Something else might have changed that is causing that property to be no long populated. (Could it be a problem that I'm accessing it from a user control? Although the other page properties seem to be showing up fine.)
Cast the SiteMapNode as mojoSiteMapNode and then you will have a.Depth property.
mojoSiteMapNode n = (mojoSiteMapeNode)SiteMap.CurrentNode;
then use n.Depth
Aha! Thanks again.