Creating new shape for the menu item content itself

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-05-21 14:24:40 -07:00
parent c59709d68c
commit cf4411a644
3 changed files with 10 additions and 4 deletions

View File

@@ -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.

View File

@@ -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)

View File

@@ -0,0 +1 @@
<a href="@Model.Href">@Model.Text</a>