mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 20:13:52 +08:00
Creating new shape for the menu item content itself
--HG-- branch : 1.x
This commit is contained in:
@@ -522,6 +522,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Shapes\Views\Breadcrumb.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Shapes\Views\MenuItemLink.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -16,10 +16,12 @@ if (!HasText(Model.Text)) {
|
||||
}
|
||||
var tag = Tag(Model, "li");
|
||||
@tag.StartElement
|
||||
<a href="@Model.Href">@Model.Text</a>
|
||||
if(Model.Divider != null) {
|
||||
@Display(Model.Divider)
|
||||
}
|
||||
|
||||
@* morphing the shape to keep Model untouched*@
|
||||
Model.Metadata.Alternates.Clear();
|
||||
Model.Metadata.Type = "MenuItemLink";
|
||||
@Display(Model)
|
||||
|
||||
if (items.Any()) {
|
||||
<ul>
|
||||
@DisplayChildren(Model)
|
||||
|
||||
1
src/Orchard.Web/Core/Shapes/Views/MenuItemLink.cshtml
Normal file
1
src/Orchard.Web/Core/Shapes/Views/MenuItemLink.cshtml
Normal file
@@ -0,0 +1 @@
|
||||
<a href="@Model.Href">@Model.Text</a>
|
||||
Reference in New Issue
Block a user