Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • William Neal 2 posts 72 karma points
    Feb 20, 2018 @ 20:19
    William Neal
    0

    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

  • Nik 1612 posts 7258 karma points MVP 7x c-trib
    Feb 21, 2018 @ 00:02
    Nik
    1

    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

Please Sign in or register to post replies

Write your reply to:

Draft