You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by MRSheikh May 11, 2024
hi.
I use Orchardcore without cms "OrchardCore.Application.Mvc.Targets" to my projects and add my module to it.
I know to add builder.Services.AddOrchardCore().ConfigureServices(s => { s.AddResourceManagement(); s.AddTagHelpers<LinkTagHelper>(); s.AddTagHelpers<MetaTagHelper>(); s.AddTagHelpers<ResourcesTagHelper>(); s.AddTagHelpers<ScriptTagHelper>(); s.AddTagHelpers<StyleTagHelper>(); });
in my program and then implement ResourceManifest.cs for my module too.
after that in _ViewImports.cshtml add @addTagHelper *, OrchardCore.DisplayManagement @addTagHelper *, OrchardCore.ResourceManagement
and in _ViewStart.cshtml use tag helpers like this:
Make sure you add reference to OrchardCore.DisplayManagement on your module. Also make sure that your module is different that your web project. so have a web project where you add builder.Services.AddOrchardCore().... then add a module project for your module where you can reference OrchardCore.DisplayManagement
Discussed in #16031
Originally posted by MRSheikh May 11, 2024
hi.
I use Orchardcore without cms "OrchardCore.Application.Mvc.Targets" to my projects and add my module to it.
I know to add
builder.Services.AddOrchardCore().ConfigureServices(s => { s.AddResourceManagement(); s.AddTagHelpers<LinkTagHelper>(); s.AddTagHelpers<MetaTagHelper>(); s.AddTagHelpers<ResourcesTagHelper>(); s.AddTagHelpers<ScriptTagHelper>(); s.AddTagHelpers<StyleTagHelper>(); });
in my program and then implement
ResourceManifest.cs
for my module too.after that in
_ViewImports.cshtml
add@addTagHelper *, OrchardCore.DisplayManagement @addTagHelper *, OrchardCore.ResourceManagement
and in
_ViewStart.cshtml
use tag helpers like this:all scripts were added successfully into my module but nothing for styles????
what should I do to import my module styles to tag helper?
The text was updated successfully, but these errors were encountered: