Copied to clipboard

Flag this post as spam?

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


  • Ray Mueller 3 posts 24 karma points
    Jul 02, 2010 @ 07:11
    Ray Mueller
    1

    Best Practice at using DocTypes

    To start with, I have been using DotNetNuke for the last 2-3 years and Umbraco “ROCKS!” Umbraco performs faster and enables inclusion of add-in’s using Microsoft’s .NET methods and practices.

    I have a decent understanding of docTypes and templates however I am missing some of the finer best practices.

     

    My approach to creating a look and feel, I think of modules or areas where a functional block can be added to a location on the page. So, at this current point if I want to add multiple HTML presentation areas on the same page then I will need to create a doctype for instance that I want to include.

     

    Example. I want to be able to add two areas in a column where the user can change the content. Each functional block will have a Title and Content. So if I want to enable two functional areas then I will need to create two nearly identical DocTypes in order to different alias names.

     

    It’s almost difficult to explain so I trust that I am making some sense. I am trying to reduce the need to create a bunch of docTypes with the same functionality just to generate difference alias names.

     

    Any insight will be appreciated.

     

    Ray

     

  • Gerty Engrie 130 posts 490 karma points c-trib
    Jul 02, 2010 @ 07:20
    Gerty Engrie
    0

    Hi Ray,

    if i understand you correctly then master doctypes is probably what you are looking for (only in v4 and higher) :-) It's inheritance between doctypes. You can use any doctype  as a master. You can achieve this when you create your second doctype by selecting your first as master. That way the second one will also have all properties of the first one without you needing to create them.

    Was this what you are looking for? :-)

    Gerty

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 02, 2010 @ 09:32
    Dirk De Grave
    0

    Hi Ray,

    From what I can read, you'd like to include multiple content (probably of the same type of content = doctype) on a single page and let users decide what to include on that page? If so, I'd create a single doc type, create multiple content nodes of that type (probably store these content nodes in a separate tree node) and use the tree multi picker to allow users to pick one or more of these content nodes to be included on a page. A tree multi picker allows to specify a parent node (which could be your container node where you've created all of those content nodes)

    Shout if you need more help on this or if you didn't quite understand what I'm talking about!

     

    Cheers,

    /Dirk

  • Ray Mueller 3 posts 24 karma points
    Jul 02, 2010 @ 17:56
    Ray Mueller
    0

    Gerty and Dirk,

    Thank you very much for your responses.

    Gerty - Yes, I will need to create a master doctype and then create (sub) doctypes for each instance as you stated.

    Dirk - I cannot say that I fully understand how to use a tree multi picker however I will know more as I spend some more time this weekend.

    I really appreciate your help and time to respond.

    Enjoy the weekend.


    Ray

  • Matt Brailsford 4124 posts 22221 karma points MVP 9x c-trib
    Jul 02, 2010 @ 23:25
    Matt Brailsford
    0

    I think Dirks suggestion sounds like what you are trying to achieve, but maybe this will explain it a little better for you

    http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/

    Matt

     

  • Matt Brailsford 4124 posts 22221 karma points MVP 9x c-trib
    Jul 02, 2010 @ 23:37
    Matt Brailsford
    0

    I believe that Umbraco should be releasing a Multi Macro Picker data type soon aswell, which should also help with this kind of setup, unfortunatley I don't have much info on this at the moment and I think it will only be v4.5.

    Matt

  • Matt Brailsford 4124 posts 22221 karma points MVP 9x c-trib
    Jul 04, 2010 @ 20:32
    Matt Brailsford
    0

    FYI, the Multi Macro Picker is actualy called Macro Container and comes with version 4.5. You just need to create a datatype, and select Macro Container in the Render Control field.

    Matt

  • Daniel Bardi 927 posts 2562 karma points
    Jul 04, 2010 @ 21:17
    Daniel Bardi
    0

    Awesome addition... the Macro Container looks similar to the Macro Picker datatype.. I've used it before for sidebar content.

  • Ray Mueller 3 posts 24 karma points
    Jul 09, 2010 @ 16:22
    Ray Mueller
    0

    Thanks for the insight and time to respond. It was a good learning experience...

    Ray

  • Connie DeCinko 931 posts 1160 karma points
    Jul 27, 2010 @ 00:23
    Connie DeCinko
    0

    If I have a master document type for my main content pages, would I put my document types for side bar items under there or should these not be under the same master doc type?

  • Daniel Bardi 927 posts 2562 karma points
    Jul 27, 2010 @ 00:34
    Daniel Bardi
    0

    I put sidebar items (widget) document types under their own master doctype (to inherit properties) or in the root of doctypes.

    If you put them under your site's master doctype, then they will inherit all tabs and properties from it.  Sidebar items are components of a page and should be considered non-browseable nodes. (i.e. no template, no seo, etc..)

    Has an OOP developer I think in terms of objects, inheritance and separation of concerns.

  • JohnSheridan 9 posts 29 karma points
    Aug 24, 2010 @ 18:08
    JohnSheridan
    0

    Hallo Experts,

    I am also using dotnetnuke for the last years and try to learn umbraco,
    but the document type makes me a little confusing.

    In Dotnetnuke I was used first to define the page structure and than add modules to the panes.
    For me it seems this is the way how a developer would think (top-down method):
    First draw the pages/structure of website and then fill with content.

    In Umbraco it seems for me the button up way: first create a document type, than a template
    and last create a content item (equal page structure in my understanding).

    Another idea is: Dotnetnuke is for me more a WYSISYG CMS System and Umbraco an Admin CMS Tool,
    isn't it?

    Please help me, to understand why Umbraco use document types and - how I would call it - a Button Up Developing.

    Is a Document Type similar to a document template like a .dot in word?

    I am really very neutral about both systems. Its only a confusion to me because its another way for developing websites.
    I have read through some of the books on umbraco.org, but I have a missing link how it works.

    Many thanks in advance for your help and best regards

    John

     

  • JohnSheridan 9 posts 29 karma points
    Aug 24, 2010 @ 19:35
    JohnSheridan
    0

    The more I think about document types the more I belive the document type is document template without a view, isn't it?

    So you could define the document structure (text, richtextbox, images) which can be viewed in different way (in the template).

    In the content section the document type can be used as much as you want.

    Are this assumptions correct?

     

  • Daniel Bardi 927 posts 2562 karma points
    Aug 24, 2010 @ 23:36
    Daniel Bardi
    0

    Document types are a way of collecting the data/content and templates are a way of displaying that collected content. (think separation of concerns)

    Document types are link the tables in a database... each table contains specific data related to a business object.  Document types contain specific information related to content.. (i.e. text page, business listing, slidshow, etc..)

    Design your document types as if you would design tables in a database.. each document type contains specific properties based on it uses.  If several types will contain the same data but some will have additional data requirements, use a master document type (doctype with children) to have the children inherit the properties (like class inheritance in code)

    Use templates and macros to style the content collected from nodes based on document types.

    Hope this helps!

  • JohnSheridan 9 posts 29 karma points
    Aug 25, 2010 @ 09:12
    JohnSheridan
    0

    hi Daniel,

    many thanks for your try to get my thinking right :-)

    Is a document type like a model (in a model view controler pattern or more like a model view presenter)?
    The modell contains the data or better structure (text page, gallery) for the document and the template is the view?

    In the template node I can add this modell data to the view to any location of the view?

    And in the content I create the page structure of the website(menu)

    Should I think like that?

    Or is it more a definiton of an ASP.NET user control?
    Because in the template I can insert a document type (which becomes a usercontroler):

    Codesnippet from template code (angel bracket deleted because code disappers otherwise)

    asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"
     umbraco:Item field="richtextEditor" runat="server"
    asp:Content

    Or should I think like that (user control definition)?

    So first I defined of which elements (text, image, or a combination defined in the tab section) the document consists. Second you define a view (template, aspx page) how the document elements (types) should looks like.
    And third you define the page structure in the content section.

    So in my thinking its more a buttom up developing than a top down developing in dotnetnuke, isn't it?

    Another idea is following:

    For me Umbraco is more content oriented:
    A user add or edit content in the content section (not in the form it is displayed on the website).

    The content exists of one or more elements (properties) like text, images and so on.
    The properties and the templates (UI) is defined in the settings because not every user should change this.
    But the first elements to define are document type and the template.

    So the hierarchie is for me:
    Content
    - Document Type
      - properties (elements of the contents)

    and for viewing: the template

    Please help me to solve my confusion

    Many thanks in advance and best regards

    John

Please Sign in or register to post replies

Write your reply to:

Draft