Rename Home node in multisite / multilingual setup.
Hi all,
I have the following setup for a multisite / multilingual site (only in English just now).
Region
EN (Home)
Page
EN-FR (Home)
Page
Im having an issue with my breadcrumb partial returning the page node name, EN and EN-FR.
How can I "hardcode" the first node name?
@{ var selection = Model.Content.Ancestors().Where("Level > 1").ToArray(); }
@if (selection.Length > 0)
{
<ul class="breadcrumb">
@* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@
@foreach (var item in selection.OrderBy(x => x.Level))
{
<li><a href="@item.Url">@item.Name</a> <span class="divider">/</span></li>
}
@* Display the current page as the last item in the list *@
<li class="active">@Model.Content.Name</li>
</ul>
}
I would surgest that you add a property on your document types, something like "Menu Text" or "Breadcrumb Text" to be able to configure the text for menus and/or the breadcrumb.
Then when you render the names of the nodes you first check for this property and fallback to the node name if the property is not set.
Rename Home node in multisite / multilingual setup.
Hi all,
I have the following setup for a multisite / multilingual site (only in English just now).
Im having an issue with my breadcrumb partial returning the page node name, EN and EN-FR.
How can I "hardcode" the first node name?
Thanks
Martin
Hi Martin!
I would surgest that you add a property on your document types, something like "Menu Text" or "Breadcrumb Text" to be able to configure the text for menus and/or the breadcrumb.
Then when you render the names of the nodes you first check for this property and fallback to the node name if the property is not set.
Would that work?
is working on a reply...