I am starting out in Umbraco and I am trying to use Razor to access properties in datatypes like Content Pickers and Media Pickers.
I have seen the examples but I am still unclear as to how I can know the list of accessable properties of each data type, for example how would I know that content picker has a property called "URL"?
This is the best piece of information we have at the moment, you may need to check if you are using packages, like DAMP for example in the documentation for that package as to the properties available, but this is a good general guide.
Any questions, please ask here, we are all learning together.
Forgot to say also that if you use @Model.Content to call your property you can get Intellisense in WebMatrix and Visual Studio.
In V6 with MVC you can use @CurrentPage as dynamic, but does not have Intellisense, but if you use @Model.Content. (put the dot) you will see Intellisense.
Properties in data types
Hello,
I am starting out in Umbraco and I am trying to use Razor to access properties in datatypes like Content Pickers and Media Pickers.
I have seen the examples but I am still unclear as to how I can know the list of accessable properties of each data type, for example how would I know that content picker has a property called "URL"?
Thank you!
Joei
Hi Joei
Yes, this can be a little difficult at first.
This is the best piece of information we have at the moment, you may need to check if you are using packages, like DAMP for example in the documentation for that package as to the properties available, but this is a good general guide.
Any questions, please ask here, we are all learning together.
http://our.umbraco.org/projects/developer-tools/razor-dynamicnode-cheat-sheet
Look top left side, properties are listed.
regards
G
Thank you Gary :)
Joei
Forgot to say also that if you use @Model.Content to call your property you can get Intellisense in WebMatrix and Visual Studio.
In V6 with MVC you can use @CurrentPage as dynamic, but does not have Intellisense, but if you use @Model.Content. (put the dot) you will see Intellisense.
Hope that helps
G
is working on a reply...