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
Hi :)
I have a header tag in my basetemplate:
<header id="header" class="alt">
And I only wan't it to have the class attribute class="alt" on the frontpage. So all the other pages that use the same basetemplate should have: <header id="header">
class="alt"
<header id="header">
I can hardcode it, but is there a smart way to do this in Umbraco?
Thanks in advance
If you are using MVC I think you could do something like this in the template:
@{ string sHeaderClass = ""; if(CurrentPage.Level == 1){ sHeaderClass = "alt"; } else{ sHeaderClass = ""; } <header id="header" class="@sHeaderClass"> }
Worked perfectly !
Thanks @Ben
Your welcome Anders, glad I could help!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Remove header attribute on some pages
Hi :)
I have a header tag in my basetemplate:
<header id="header" class="alt">
And I only wan't it to have the class attribute
class="alt"
on the frontpage. So all the other pages that use the same basetemplate should have:<header id="header">
I can hardcode it, but is there a smart way to do this in Umbraco?
Thanks in advance
If you are using MVC I think you could do something like this in the template:
Worked perfectly !
Thanks @Ben
Your welcome Anders, glad I could help!
is working on a reply...