Copied to clipboard

Flag this post as spam?

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


  • Ingólfur Valsson 3 posts 23 karma points
    Apr 23, 2016 @ 16:59
    Ingólfur Valsson
    0

    Basic Document Type starters

    So while I've studied a little bit of Umbraco I always think I learn most from hands on work, and even though I understand it somewhat I'm little bit at lost at the most basic thing, starting document types. I guess I should just create a basic Home, and under that a Page etc.

    I'm afraid I might cripple myself if I do something wrong here and realize later that Home should definitely have had a parent type with SEO options and it already having content might make it immutable. Also just having a problem getting started as most CMS I've tried start you off somewhat more.

    So I was wondering if there is any Starterkit or guide out there that gives you a good solid groundwork by supplying you with some generic Document Types that are usable in most sites. That you can then mold to your liking as you learn more?

    Bonus question, while surveying Umbraco it feels a bit like Document Types are less reusable than I would hope. You create a Home document type you will only use once, I've seen specific About, Contact document types as well and it's starting to seem you have a 1 on 1 relationship between content and document types. Is this just because I've seen more basic examples and little of examples using a collection of similar things?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 23, 2016 @ 18:04
    Nicholas Westby
    0

    When you install Umbraco, you are given the option of installing a few starter kits. You can create a playground site with one of those starter kits to experiment.

    The current advice is to avoid nesting document types. Instead, use compositions. It basically allows you to use the concept of multiple inheritance with document types.

    On my latest sites, I've been creating a single document type, "Typical". I build sites with widgets (using Archetype), so most every page is the same aside from the widgets on that page.

    I do actually create a few document types, but usually just to provide default content (i.e., default widgets) using this plugin a coworker created: https://our.umbraco.org/projects/backoffice-extensions/contenttemplates/

    Here's an example site I and a few coworkers created using an approach very similar to the one I described above: https://nvisioncenters.com/

  • Ingólfur Valsson 3 posts 23 karma points
    Apr 25, 2016 @ 11:14
    Ingólfur Valsson
    0

    Yeah I remember now hearing about compositions replacing inheritance before, I'm thinking they are used similarly to interfaces in C#, a promise this type will do certain things.

    On my latest sites, I've been creating a single document type, "Typical". I build sites with widgets (using Archetype), so most every page is the same aside from the widgets on that page.

    I'm looking into Archetype and will test it out, but I'm not sure I understand your widget use case.

    What other packages do you think could be useful in most projects, I'm lacking the tribe knowledge that is often inherit in these kind of frameworks.

    Thank you for your help.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 25, 2016 @ 12:54
    Nicholas Westby
    0

    What other packages do you think could be useful in most projects

    This article I wrote a few months ago pretty much goes over that: http://24days.in/umbraco/2015/umbraco-zeitgeist/

    I'm not sure I understand your widget use case.

    I also explain that in a comment at the bottom of that article:

    Widgets

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Apr 23, 2016 @ 20:38
    Dan Diplo
    0

    You can use compositions instead of inheritance in Umbraco so you don't need to worry about making the "wrong choice" when inheriting. So you would create your a document type (without a template) called SeoSettings and add all your SEO setting properties to it. Then you would get your home page to use it as a composition "mixin". You can then add the same SeoSettings document type to any other pages. You can also easily remove a composition if you realise you don't need it. And a single doc type can implement any number of compositions.

    See http://letswritecode.net/articles/document-type-compositions-in-umbraco/

Please Sign in or register to post replies

Write your reply to:

Draft