Copied to clipboard

Flag this post as spam?

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


  • David Amri 214 posts 740 karma points
    Aug 18, 2016 @ 06:43
    David Amri
    0

    Use Partial views or Document Types to define content sections on page

    Hi,

    Let me first of all tell you that I'm a total newbie to Umbraco. In the last couple of weeks I've been reading and watching various documentations and tutorials trying to figure out how to use Umbraco. I think I've learned a lot on the way but I must admit it is quite hard to get a good understanding of the system, especially since I'm more of a designer then a pure developer.

    With that said what I'm having most trouble understanding is how I should use, and when to use what when it comes to DocTypes, Partial Views and Templates.

    Let's say I have a Landing page with sections as follows:

    • First of a Hero-section with a picture and some text at the top.
    • Then I have a Quote-section with some quotes.
    • Then a section with three columns containing a picture, title and text.

    What type of building blocks and structure should I use in order to make this manageable. I'm not sure if these sections should be built as Partial Views or if the sections should be DocTypes with matching Templates.

    Let's say I want to make a Product Page later and reuse the Quote-Section on this page? Or if I make a News Page and want to show the 3 first news on the Landing Page?

    I also want to point out that I'm building this site inhouse and we are not planing for our editors to create new pages and sections, they will mainly add news posts and edit already existing content (or is this a bad choice). I'm sorry if my examples are poorly explained, also for my not so awsome English.

  • Kevin Jump 2348 posts 14896 karma points MVP 8x c-trib
    Aug 18, 2016 @ 08:49
    Kevin Jump
    0

    Hi David,

    Like you say it depends a bit on how much you are going to reuse each bit of information, but in general i would say create partial views for each section, then build the templates up by calling the partial views you need for each page.

    In genreral if you think the content is going to be unique to a page then create the document type so editors can create the content there.

    but when you think you are going to reuse the content create new doctypes (not necessarily with their own templates). then you can use a Multi-Node Tree Picker to let the editor select the content from other pages

    so for example you might have a whole lot of Quotes, each one could be a node in Umbraco When creating content the editors would pick them using the tree picker to appear on the page.

    News is another partial, but instead of letting editors pick the news items, you create a partial that looks down the tree (from wherever news it) and returns the latest three articles.

    you might want to look at something like the LocalGovStarterKit (disclaimer i wrote it), that has some of these things in it - (i would install it on a test site, you don't want it overwriting anything you've already got)

  • David Amri 214 posts 740 karma points
    Aug 18, 2016 @ 11:03
    David Amri
    0

    Hi Kevin,

    Much appreciated information. I will take a look in to the kit you mentioned and see if I can learn something from it, I'm sure I will.

    I found this tutorial very useful in order to understand the different components in Umbraco and when to use them. Do you have any tips of something similar? The approach of explaining Umbraco with the design of the page as a base really helps me as a designer.

    Cheers!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies