Abp: Change master layout

Created on 16 Feb 2019  路  6Comments  路  Source: abpframework/abp

Hi,
Sorry for my probably simple question.
I can鈥檛 find master layout or any shared folder for changing theme anywhere?

Do I need to add something?

Br Mads

Most helpful comment

OR: (_my suggest_)

  1. Create new layout at your web project
  2. Set basic theme empty layout as Layout of your custom layout
    _myLayout.cshtml:
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@{
    Layout = ThemeManager.CurrentTheme.GetEmptyLayout()
}
///your awesome master layout codes

Then in your pages
Index.cshtml:
```cshtml
@{
Layout = _myLayout.cshtml
}

All 6 comments

Layout comes from theme Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic. Theming document isn't ready yet. You can create your own Layout as you did before or create new theme using basic theme.

I will look into that. How do I implement it so I get the files available inside the project?

  1. Clone the repository
  2. Make a copy from basic theme into your solution with new naming
  3. Change ABP local references to NuGet references in YourTheme.csproj
  4. Start developing
  5. Add your new theme dependency to your web module
  6. Set your new theme as default theme in your web module
  7. Enjoy

This is awesome, thank you very much!!

OR: (_my suggest_)

  1. Create new layout at your web project
  2. Set basic theme empty layout as Layout of your custom layout
    _myLayout.cshtml:
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@{
    Layout = ThemeManager.CurrentTheme.GetEmptyLayout()
}
///your awesome master layout codes

Then in your pages
Index.cshtml:
```cshtml
@{
Layout = _myLayout.cshtml
}

  • Clone the repository
  • Make a copy from basic theme into your solution with new naming
  • Change ABP local references to NuGet references in YourTheme.csproj
  • Start developing
  • Add your new theme dependency to your web module
  • Set your new theme as default theme in your web module
  • Enjoy

@hitaspdotnet where in the webmodule should I set my thermal ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wocar picture wocar  路  3Comments

leonkosak picture leonkosak  路  3Comments

vfabregat picture vfabregat  路  3Comments

wakuflair picture wakuflair  路  3Comments

ChangYinShung picture ChangYinShung  路  3Comments