I have added override the logo path it's not effecting in the page
public class AbpIoDocsBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "Acme - MyBookStore";
public override string LogoUrl => "/images/myLogo.png";
}
6 Answer(s)
-
0
I've created an internal issue for this. by the way, you can change the logo by overwriting the file in your
wwwroot/images/logo/
foldersrc\Acme.BookStore.Web\wwwroot\images\logo\theme1.png src\Acme.BookStore.Web\wwwroot\images\logo\theme1-reverse.png
-
0
Yes i done this way but i need to change the logo tenant based. is any other way to display tenant based logo?
-
0
As of
v2.7.0
you can override application logo easily without replacing the physical logo png files. You can inject any service and create your own logic to set the logo.[Dependency(ReplaceServices = true)] public class BookStoreBrandingProvider : DefaultBrandingProvider { //You can inject services here... private readonly ICurrentTenant _currentTenant; public BookStoreBrandingProvider(ICurrentTenant currentTenant) { _currentTenant = currentTenant; } public override string AppName => "Acme - MyBookStore"; public override string LogoUrl { get { if (_currentTenant.Name == "MyCustomer") { return "http://mycustomer.com/logo.png"; } if (_currentTenant.Id.HasValue) { return $"/images/logo/{_currentTenant.Id}"; } return "/images/logo/my-default-app-logo.png"; } } public override string LogoReverseUrl => LogoUrl; }
-
0
I create this class at xxx.Application.Contracts, but getting error DefaultBrandingProvider, What iam missing ??, abp version 2.7.0
using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; [Dependency(ReplaceServices = true)] public class COREBrandingProvider : DefaultBrandingProvider <== Error { //You can inject services here... private readonly ICurrentTenant _currentTenant;
public COREBrandingProvider(ICurrentTenant currentTenant) { _currentTenant = currentTenant; } public override string AppName => "Acme - MyBookStore"; public override string LogoUrl {
-
0
@arifharsono I believe you have to create it in the Host/Web/Identity projects (depending on what setup your using) to get access to DefaultBrandingProvider
Its located in Volo.Abp.AspNetCore.Mvc.UI.Theme.SharedComponents
-
0
@arifharsono you cannot use this class in Application.Contracts because that layer is not aware of Web components.
Use it in your *.Web project. There should be already a
BookStoreBrandingProvider.cs
in your web project. (ChangeBookStore
with your project name)The class in this package => Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components { public class DefaultBrandingProvider : IBrandingProvider, ITransientDependency { public virtual string AppName => "MyApplication"; public virtual string LogoUrl => null; public virtual string LogoReverseUrl => null; } }