I'm working on a site (ecit-edilion.emino.dk) and have some difficulties.
I wish to remove the top green menu. Is that possible and how?
I wish to make the bottom green "All Rights Reserved" border white with a thin green line between the border and the rest of the page. But how?
I wish to make some of my menu items non clickable. I managed
to have them not link to a page but when clicked it refreshes the
current page. I want it to be completely numb. But
how?
I would like to have the current page, show up in a different
color in the menu, so people can see which page they are on. But how?
You can remove it from the view that is generating it. You probably
have a Master-view (look in Templates in Umbraco, or Views folder
on the filesystem. The top green menu is probably a partial view
referenced in there. Look for @Html.Partial() and try to locate
the correct view. Partial Views can be edited through Umbraco (in
Partial Views in the Settings section of Umbraco), or in the
filesystem (look for the folder Views/Partials).
You need to change the css for this part, I can see there is several
css files referenced in the site, so you get to choose which one is
relevant :). The markup is probably located in either a Masterview,
or a partial referenced from there.
This depends on how your navigation is built, but if you change the
tags from <a> to <span> they will not try to redirect the user.
Again this depends on how your navigation is built. A typical
pattern is that the navigation is a list of child pages to a
specific page. It could look something like this:
@foreach (var page in Model.Children())
{
<a href="@page.Url">@page.Name</a>
}
You can test if one of the pages in the loop is active by doing something like this: Model.IsDescendantOrSelf(page) or Model.Id == page.Id
The first one returns true, if the visited page is either a descendant of the current, or IS the current page. The second one returns true, only if the visited page is the current page.
So bringing this back to the code would be like:
@foreach (var page in Model.Children())
{
if (Model.IsDescendantOrSelf(page))
{
<a href="@page.Url" class="active">@page.Name</a>
}
else {
<a href="@page.Url">@page.Name</a>
}
}
I know this probably doesn't apply 100% to your needs, but I hope it gets you closer to what you want :)
Menu's
Hi,
I'm working on a site (ecit-edilion.emino.dk) and have some difficulties.
Any code & umbraco geniuses who can help? 🙂
Hi Gitte
You can remove it from the view that is generating it. You probably have a Master-view (look in Templates in Umbraco, or
Views
folder on the filesystem. The top green menu is probably a partial view referenced in there. Look for@Html.Partial()
and try to locate the correct view. Partial Views can be edited through Umbraco (inPartial Views
in the Settings section of Umbraco), or in the filesystem (look for the folderViews/Partials
).You need to change the css for this part, I can see there is several css files referenced in the site, so you get to choose which one is relevant :). The markup is probably located in either a Masterview, or a partial referenced from there.
This depends on how your navigation is built, but if you change the tags from
<a>
to<span>
they will not try to redirect the user.Again this depends on how your navigation is built. A typical pattern is that the navigation is a list of child pages to a specific page. It could look something like this:
@foreach (var page in Model.Children()) { <a href="@page.Url">@page.Name</a> }
You can test if one of the pages in the loop is active by doing something like this:
Model.IsDescendantOrSelf(page)
orModel.Id == page.Id
The first one returns true, if the visited page is either a descendant of the current, or IS the current page. The second one returns true, only if the visited page is the current page.
So bringing this back to the code would be like:
I know this probably doesn't apply 100% to your needs, but I hope it gets you closer to what you want :)
Thx Søren. Kind of you to answer.
is working on a reply...