Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted