I'm just trying to figure out how to 'do something' if the current page has a certain doctype. I'm using Umbraco 4.7.0 and razor.
So far, I've tried a couple of methods and feel like I'm close but I just can't seem to get this to work. Here's what I'm currently up to, which errors with 'Cannot invoke a non-delegate type':
Conditionally run a script based on Doctype
I'm just trying to figure out how to 'do something' if the current page has a certain doctype. I'm using Umbraco 4.7.0 and razor.
So far, I've tried a couple of methods and feel like I'm close but I just can't seem to get this to work. Here's what I'm currently up to, which errors with 'Cannot invoke a non-delegate type':
@if (Model.NodeTypeAlias == "MyDocType")
{
// do something
}
Thanks man, works like a charm!
is working on a reply...