Custom Tag Helper cannot be found in theme

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 年 前
I have created a custom Tag Helper and now I would like to use that in my theme but the .cshtml cannot find it. The application sucessfully compiles and runs but I do not see my tag helper. The intellisense indicates that it cannot be found. But I cant see why. Can someone please help me. What do I need to do to create a custom TagHelper in my plugin and use it in my theme?

In my plugin I have created


namespace Nop.Web.Framework.TagHelpers.Shared
{
    [HtmlTargetElement("custom-date-picker",
        Attributes = DayNameAttributeName + "," + MonthNameAttributeName + "," + YearNameAttributeName,
        TagStructure = TagStructure.WithoutEndTag)]
    public class CustomDatePickerTagHelper : TagHelper
    {
        .......other code.......
    }


In my theme I have added


<custom-date-picker
                                ....other attr
                                />


In the viewImports there a reference to Nop.Web.Framework


@addTagHelper *, Nop.Web.Framework
...other stuff...
@using Nop.Web.Framework
@using Nop.Web.Framework.Extensions
@using Nop.Web.Framework.Infrastructure
@using Nop.Web.Framework.Models
@using Nop.Web.Framework.Security.Captcha
@using Nop.Web.Framework.Security.Honeypot
@using Nop.Web.Framework.Themes
...other stuff...
3 年 前
Did you solve this issue?
I did custom tag helpers for nop 4.20 but my solution doesn't work for nop 4.30.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.