Browse Source

Merge pull request #4573 from abpframework/maliming/PageContent-LayoutHook

Add PageContent layout hook.
pull/4595/head
Halil İbrahim Kalkan 6 years ago
committed by GitHub
parent
commit
41f8d03605
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml
  2. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml
  3. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml
  4. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHooks.cs

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml

@ -86,7 +86,9 @@
</div> </div>
} }
@(await Component.InvokeAsync<PageAlertsViewComponent>()) @(await Component.InvokeAsync<PageAlertsViewComponent>())
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Account)
@RenderBody() @RenderBody()
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Account)
</abp-column> </abp-column>
</abp-row> </abp-row>
</div> </div>
@ -102,4 +104,4 @@
@await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Account) @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Account)
</body> </body>
</html> </html>

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml

@ -64,7 +64,9 @@
@RenderSection("content_toolbar", false) @RenderSection("content_toolbar", false)
</div> </div>
</div> </div>
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Application)
@RenderBody() @RenderBody()
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Application)
</div> </div>
<abp-script-bundle name="@BasicThemeBundles.Scripts.Global" /> <abp-script-bundle name="@BasicThemeBundles.Scripts.Global" />
@ -78,4 +80,4 @@
@await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Application) @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Application)
</body> </body>
</html> </html>

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml

@ -59,7 +59,9 @@
<div class="@containerClass"> <div class="@containerClass">
@(await Component.InvokeAsync<PageAlertsViewComponent>()) @(await Component.InvokeAsync<PageAlertsViewComponent>())
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Empty)
@RenderBody() @RenderBody()
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Empty)
</div> </div>
<abp-script-bundle name="@BasicThemeBundles.Scripts.Global" /> <abp-script-bundle name="@BasicThemeBundles.Scripts.Global" />
@ -73,4 +75,4 @@
@await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Empty) @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Empty)
</body> </body>
</html> </html>

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHooks.cs

@ -13,5 +13,11 @@
public const string First = "Body.First"; public const string First = "Body.First";
public const string Last = "Body.Last"; public const string Last = "Body.Last";
} }
public static class PageContent
{
public const string First = "PageContent.First";
public const string Last = "PageContent.Last";
}
} }
} }

Loading…
Cancel
Save