I am setting up a new Umbraco site - this is the first time I have used Umbraco and was wondering how to get the generic properties for the node back as the type I set them as.
For example, I have created a generic property of includeSubNav
which I have set to a type of true/false
. To access this property I am calling
Node.GetCurrent().getProperty("includeSubNav").Value
My question is, is this the correct way to get the property? If so why is the .Value
always returned as a string as in this instance a "1" isn't very helpful as I can't parse this as a boolean, which means I have to use an if statement to see if it is "1" which I just find quite dirty