Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

TopicDetails.cshtml

@model TopicModel

@using Nop.Core
@using Nop.Core.Domain.Seo
@using Nop.Core.Domain.Topics

@inject IWebHelper webHelper
@inject SeoSettings seoSettings

@{
    var isPopup = ViewBag.IsPopup ?? false;

    if (!isPopup)
    {
        Layout = "_ColumnsOne";
    }

    if (!Model.IsPasswordProtected)
    {
        //title
        NopHtml.AddTitleParts(!string.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Title);
        //meta
        NopHtml.AddMetaDescriptionParts(Model.MetaDescription);
        NopHtml.AddMetaKeywordParts(Model.MetaKeywords);
    }

    if (seoSettings.CanonicalUrlsEnabled)
    {
        var topicUrl = Url.RouteUrl(new { SeName = Model.SeName }, webHelper.GetCurrentRequestProtocol()).ToLowerInvariant();
        NopHtml.AddCanonicalUrlParts(topicUrl, seoSettings.QueryStringInCanonicalUrlsEnabled);
    }

    //page class
    NopHtml.AppendPageCssClassParts("html-topic-page");
}
@if (Model.IsPasswordProtected)
{
    
    
@T("Topic.EnterPassword")
}
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerTopicDetailsTop, additionalData = Model })

@Model.Title

@Html.Raw(Model.Body)
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerTopicDetailsBottom, additionalData = Model })