Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In my website there are some pages that have no links, but when I make breadcrumbs the pages with no links returns 404 page, I would like to make this page static instead, can anyone help?
Below are my code so far,
@{ var selection = Model.Ancestors().ToList(); if (selection.Any()) { <ul class="breadcrumb" style="list-style-type: none; display:inline-block; margin: 0 0 3px 0;"> @foreach (var item in selection.OrderBy(x => x.Level)) { var pageTitle = item.Name; <li style="display: inline-block; margin: 0 10px 0 0;"> <a href="@item.Url" title="@pageTitle"> > @pageTitle </a> </li> } </ul> } }
Anyone?
Hey Strawberrylatte,
You could do something like this:
@{ var selection = Model.Ancestors().ToList(); if (selection.Any()) { <ul class="breadcrumb" style="list-style-type: none; display:inline-block; margin: 0 0 3px 0;"> @foreach (var item in selection.OrderBy(x => x.Level)) { var pageTitle = item.Name; <li style="display: inline-block; margin: 0 10px 0 0;"> @if(string.IsNullOrWhiteSpace(item.Url) || item.Url == "#") { <text>> @pageTitle</text> } else { <a href="@item.Url" title="@pageTitle"> > @pageTitle </a> </li> } </ul> } }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to set breadcrumbs with no link as static
In my website there are some pages that have no links, but when I make breadcrumbs the pages with no links returns 404 page, I would like to make this page static instead, can anyone help?
Below are my code so far,
Anyone?
Hey Strawberrylatte,
You could do something like this:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.