I want to have a generic breadcrumb on my forum so have been writing a method to put it together. I have hit a stumbling block however in that when on a topic I cannot retrieve the topic to add to the breadcrumb.
This is the code I have so far
[ChildActionOnly]
public PartialViewResult GetBreadcrumb()
var viewModel = new BreadCrumbViewModel();
if (AppHelpers.CurrentPage().DocumentTypeAlias == AppConstants.DocTypeForumCategory)
{
var category = ServiceFactory.CategoryService.Get(CurrentPage.Id, true);
viewModel.Categories = category.ParentCategories;
viewModel.Category = category;
}
// how do I check this is a topic and retrieve it to add to the model
return PartialView(PathHelper.GetThemePartialViewPath("GetBreadcrumb"), viewModel);
}
Retriving the category is simple enough as those pages exist in umbraco however how to I retrieve the topic as it's a virtual page. Can anyone advise?
Retrieve Topic for generic breadcrumb
I want to have a generic breadcrumb on my forum so have been writing a method to put it together. I have hit a stumbling block however in that when on a topic I cannot retrieve the topic to add to the breadcrumb.
This is the code I have so far
Retriving the category is simple enough as those pages exist in umbraco however how to I retrieve the topic as it's a virtual page. Can anyone advise?
Thanks
is working on a reply...