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
I would like to have the page url as a class name, is this possible?
my Master page has something like
<div class="intro"> <div class="intro-holder"> <div class="spotimage"><img src="images/spot_lej1nav_1.gif" alt=""></div> <umbraco:Macro Alias="HomeStandardSpots" runat="server"></umbraco:Macro> </div> </div></div>
and imagine that the current URL is:
domain.dk/forretningsomraader/it-infrastruktur
I would like to have in the HTML code this:
<div class="intro it-infrastruktur">
what snippet/macro should I use?
Does it have to be the 100% specific url?
Otherwise you can do something like this to get a unique class per page, which will in mos cases be the same as the url:
<div class="intro"> <div class="intro-holder <%=umbraco.presentation.nodeFactory.Node.GetCurrent().Name.ToLower().Replace(" ", "-") %>"> <div class="spotimage"><img src="images/spot_lej1nav_1.gif" alt=""></div> <umbraco:Macro Alias="HomeStandardSpots" runat="server"></umbraco:Macro> </div> </div> </div>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How do I get the URL name to place as a class in a master page?
I would like to have the page url as a class name, is this possible?
my Master page has something like
<div class="intro">
<div class="intro-holder">
<div class="spotimage"><img src="images/spot_lej1nav_1.gif" alt=""></div>
<umbraco:Macro Alias="HomeStandardSpots" runat="server"></umbraco:Macro>
</div>
</div>
</div>
and imagine that the current URL is:
domain.dk/forretningsomraader/it-infrastruktur
I would like to have in the HTML code this:
<div class="intro it-infrastruktur">
what snippet/macro should I use?
Does it have to be the 100% specific url?
Otherwise you can do something like this to get a unique class per page, which will in mos cases be the same as the url:
<div class="intro">
<div class="intro-holder <%=umbraco.presentation.nodeFactory.Node.GetCurrent().Name.ToLower().Replace(" ", "-") %>">
<div class="spotimage"><img src="images/spot_lej1nav_1.gif" alt=""></div>
<umbraco:Macro Alias="HomeStandardSpots" runat="server"></umbraco:Macro>
</div>
</div>
</div>
is working on a reply...