If I am understanding you correctly something like below should work fine. It's untested, but hopefully it will be enough to get you on your way.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "Master.cshtml";
}
<!-- MAIN CONTENT -->
<div id="main">
// stuff for all pages
// stuff for all pages
// stuff for all pages
@if(CurrentPage.Id == 1200)
{
<div id="special">
// this stuff is just for this one page
</div>
}
</div>
Target a certain nodeid with inline script in umbraco template
Hi all, ok am going for the long explanation here..sorry 'bout that.
I have a template which i used to create various inner pages. But now I have to insert a div in only one of the inner page.
So i will insert the html code in the template but i want to wrap it in a condition to check when the current page has nodeID i want it to render in.
Is this clear enough and how do i do that.
Thks for your precious help.
Am using Umbraco 7
Hi Sam,
If I am understanding you correctly something like below should work fine. It's untested, but hopefully it will be enough to get you on your way.
Hi thanks will try that..
//Sam
ok get it to work with that:
Good to hear Sam! Would you mind marking my answer as the solution? Thanks - and glad you got it working. -Roger
is working on a reply...