and you will get all the properties, functions, etc. of this object.
good luck! yesturday i did my first macro - a customized sub navigation for my needs. it was no so easy after using xslt in the past year.. but at the end, i get really nice and short code. i'm sure after practice we can have some really nice results.
Eran is correct, instead of writing Model, write CurrentModel and you'll see. It does exactly the same as the code that kows posted, but without all the code. ;-)
intellisense of model
hi, i'm trying to work on my first macro.
i've created a cshtml file, i create a foreach loop but i can get intellisense for Model
please help.
thank you :)
first of all as you know i'm also new i'n razor macros...
but i found that if i use CurrentModel instead of Model, i get the intellisense.
from my checks its the same object, please someone correct me if i'm wrong.
another tip that i can give you, is to download the umbraco source and take a look on the file:
\umbraco_b9d17b6ddfe2\umbraco.MacroEngines.Juno\RazorDynamicNode\DynamicNode.cs
and you will get all the properties, functions, etc. of this object.
good luck! yesturday i did my first macro - a customized sub navigation for my needs. it was no so easy after using xslt in the past year.. but at the end, i get really nice and short code. i'm sure after practice we can have some really nice results.
@using umbraco.MacroEngines
@{
var myModel = (DynamicNode) Model;
myModel.
}
from the razor movie @ http://www.buug.be/en/events/umbraco-festival
eran - what is CurrentModel?
kows thanks ! that's exactly what i was looking for
Eran is correct, instead of writing Model, write CurrentModel and you'll see. It does exactly the same as the code that kows posted, but without all the code. ;-)
i have Model, but no CurrentModel :s
is working on a reply...