As I wrote in my previous post, I am working on the sitefinity project and it is almost done so I have some spare time to care my blog.
So I will start posting sitefinity related tips and tricks which I found them during the development.
Well! Here is the first Sitefinity tips and tricks for someone who wants to get current page name.
//get the current page name e.g. home.aspx
protected IPage getPage()
{
ICmsUrlContext pageKey = (ICmsUrlContext)this.Context.Items[Telerik.Cms.Web.UrlHelper.CmsPageKey];
Guid currentPageID = pageKey.PageID;
var cmsManager = new CmsManager();
IPage page = cmsManager.GetPage(currentPageID);
return page;
}