Skip to content

Commit

Permalink
The home page link is incorrect and just links to the root of the sit…
Browse files Browse the repository at this point in the history
…e but it might not be that page #27 - and cleans up usages of Site() along with removing Dynamic access
  • Loading branch information
Shazwazza committed Sep 13, 2017
1 parent db1af54 commit d883240
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/Umbraco.SampleSite.Website/Views/Master.cshtml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
@using ContentModels = Umbraco.Web.PublishedContentModels;
@using Umbraco.Core
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@inherits UmbracoTemplatePage
@{
Layout = null;

// Get basic design settings from the homepage
ContentModels.Home home = Model.Content.Site() as ContentModels.Home;
var home = (Home)Model.Content.Site();
var colorTheme = Umbraco.GetPreValueAsString(home.ColorTheme);
var font = Umbraco.GetPreValueAsString(home.Font);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var selection = site.Children.Where(x => x.IsVisible());
}
<!-- uncomment this line if you don't want it to appear in the top navigation -->
<a class="nav-link @Html.Raw(@Model.Content.Id == site.Id ? "navi-link--active" : "")" href="/">@CurrentPage.Site().Name</a>
<a class="nav-link @Html.Raw(Model.Content.Id == site.Id ? "navi-link--active" : "")" href="@site.Url">@site.Name</a>

This comment has been minimized.

Copy link
@Wyren

Wyren Jan 22, 2019

Typo in the css class to underscore the link

@foreach (var item in selection)
{
<a class="nav-link @(item.IsAncestorOrSelf(Model.Content) ? "nav-link--active" : null)" href="@item.Url">@item.Name</a>
Expand Down

0 comments on commit d883240

Please sign in to comment.