Copied to clipboard

Flag this post as spam?

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


  • Matt 91 posts 237 karma points
    Mar 11, 2013 @ 15:18
    Matt
    0

    Best practice for document type inheritance/tree structure

    Currently I use this structure:

    Content pages:

    - Website (Master)

    - Page 1 (Page)

    - Page 2 (Page)

    Document types:

    - Master

    - Page

    The Master document type contains properties such as SEO meta tags, meta description, umbracoNaviHide etc - properties I want on every page of the site.

    The problem I am having is when the master template I am using has an area of text I wish to be editable, for example a footer copyright text. Using my current tree structure if I add this copyright text as a property of the Master page, it is inherited on every other page which I do not want (only want to set it once).

    I can solve this by not having the pages as children of the Master document type, but then I lose the functionality of the SEO properties on every page.

    Am I missing something obvious here? Is there any way to have the convenience of a master document type for common properties, as well as having a place to set global properties (footer text etc).

  • gary 385 posts 916 karma points
    Mar 11, 2013 @ 15:59
    gary
    100

    Hi Matt

    The master doctype does not have to be assigned to a node. so create a master with all your SEO, then a child of it for your website node, with just the footer text property - it only appears on that node, while all your SEO appear on every node.

    Document types:

    - Master

    -Website

    - Page

    Hope it helps G

     

     

     

  • gary 385 posts 916 karma points
    Mar 11, 2013 @ 16:00
    gary
    0

    Sorry Matt, the post changed the alignment, website and page are two children of master.

    G

  • Fergus Davidson 309 posts 587 karma points
    Mar 11, 2013 @ 16:16
    Fergus Davidson
    0

    Hi Matt

    personally i do not use this sort of structure for Document Types - i had problems once which took me ages to sort out and now i avoid it at all costs.

    I use the fantastic DocTypes MixIns package: http://our.umbraco.org/projects/backoffice-extensions/doctypemixins

    this allows me to set up meta content, page settings, standard content etc as mixins and then these can be very quickly added to the DocumentTypes for the site. The Mixins are easily updated and seems to be better than the parent-child relationship for DocTypes.

    I do use a conventional parent-child structure for the Templates though.

    F

  • Matt 91 posts 237 karma points
    Mar 11, 2013 @ 16:17
    Matt
    0

    Ah, of course. *facepalm*

    Much appreciated Gary, all working now!

Please Sign in or register to post replies

Write your reply to:

Draft