Current PageTitle

Posted by Community Admin on 03-Aug-2018 15:42

Current PageTitle

All Replies

Posted by Community Admin on 02-Dec-2010 00:00

The Title is coming back blank on the current page node using this code:

SiteMapBase.GetCurrentProvider().CurrentNode.Title

What I had to do is use the Key on the current node to reload the page node using the PageManager:
new PageManager().GetPageNode(new Guid(SiteMapBase.GetCurrentProvider().CurrentNode.Key)).Title

After that the title shows up.  Is there a better way to do this?

Thanks,
Matt

Posted by Community Admin on 02-Dec-2010 00:00

Hello Matt,

Unfortunately this the only way to get it. You have to get the page node object which is associated with the sitemap node. Here is the same outcome with fluent api:

string tittle = Telerik.Sitefinity.App.WorkWith().Page(Telerik.Sitefinity.Web.SiteMapBase.GetCurrentProvider().CurrentNode.Key).Get().Title;


All the best,
Radoslav Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed