Sign post me to resources on understanding models in v7.3.4
Hi gang,
I am trying to get my head around models in Umbraco. To make matters harder I working with Umbraco version 7.3.4 i.e. before the switch to model builder. Because of this the usually super helpful Umbraco TV is less helpful. Can anyone sign post me to any resources which would be more relevant?
When you are referring to Models, do you mean Models in the general MVC sense or in the Models Builder sense?
Assuming you mean Models in a general sense, well they are just classes as usual :-)
However, most views in Umbraco inherit from 2 subclasses. 1) UmbracoTemplatePage and 2) UmbracoViewPage.
Models in UmbracoTemplatePage have to inherit from RenderModel (I think that's the name of the class) were as UmbracoViewPage models can be any class. In both scenarios the model in the view is defined during the @inherits statement.
Now if you are referring to Models from Models builder I would start with these two resources:
The first is a great article on 24Days which is the annual Umbraco Advent calendar. (All the articles on there are a great read).
The second is the original repository for Models Builder that is the base for what is now in the core :-), and the Third is the wiki for said repo that has great examples and I'm pretty sure most of them are still relevant.
Sign post me to resources on understanding models in v7.3.4
Hi gang,
I am trying to get my head around models in Umbraco. To make matters harder I working with Umbraco version 7.3.4 i.e. before the switch to model builder. Because of this the usually super helpful Umbraco TV is less helpful. Can anyone sign post me to any resources which would be more relevant?
Thanks,
Will
Hi Will,
When you are referring to Models, do you mean Models in the general MVC sense or in the Models Builder sense?
Assuming you mean Models in a general sense, well they are just classes as usual :-)
However, most views in Umbraco inherit from 2 subclasses. 1) UmbracoTemplatePage and 2) UmbracoViewPage.
Models in UmbracoTemplatePage have to inherit from RenderModel (I think that's the name of the class) were as UmbracoViewPage models can be any class. In both scenarios the model in the view is defined during the @inherits statement.
Now if you are referring to Models from Models builder I would start with these two resources:
https://24days.in/umbraco-cms/2016/getting-started-with-modelsbuilder/ https://github.com/zpqrtbnk/Zbu.ModelsBuilder https://github.com/zpqrtbnk/Zbu.ModelsBuilder/wiki/Zbu.ModelsBuilder
The first is a great article on 24Days which is the annual Umbraco Advent calendar. (All the articles on there are a great read). The second is the original repository for Models Builder that is the base for what is now in the core :-), and the Third is the wiki for said repo that has great examples and I'm pretty sure most of them are still relevant.
Thanks,
Nik
is working on a reply...