8.1.3.3 Creating the View; Listing 8-8 The Contents of the Menu.cshtml File
This commit is contained in:
parent
c55dd5f133
commit
4eaf23bc64
@ -149,6 +149,7 @@
|
||||
<Content Include="Views\Product\List.cshtml" />
|
||||
<Content Include="Scripts\jquery-1.9.0.min.map" />
|
||||
<Content Include="Views\Shared\ProductSummary.cshtml" />
|
||||
<Content Include="Views\Nav\Menu.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
@ -158,7 +159,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Views\Nav\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SportsStore.Domain\SportsStore.Domain.csproj">
|
||||
|
19
SportsStore/SportsStore.WebUI/Views/Nav/Menu.cshtml
Normal file
19
SportsStore/SportsStore.WebUI/Views/Nav/Menu.cshtml
Normal file
@ -0,0 +1,19 @@
|
||||
@using System.ServiceModel.Syndication
|
||||
@model IEnumerable<string>
|
||||
|
||||
@Html.ActionLink("Home", "List", "Product", null,
|
||||
new { @class = "btn btn-block btn-default btn-lg" })
|
||||
|
||||
@foreach (var link in Model)
|
||||
{
|
||||
@Html.RouteLink(link, new
|
||||
{
|
||||
controller = "Product",
|
||||
action = "List",
|
||||
category = link,
|
||||
page = 1
|
||||
}, new
|
||||
{
|
||||
@class = "btn btn-block btn-default btn-lg"
|
||||
})
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user