Copied to clipboard

Flag this post as spam?

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


  • Tarik 35 posts 106 karma points
    Sep 22, 2014 @ 23:49
    Tarik
    0

    Can't get property value in the Master Template !

    Gents,

    I try to get the property value of a child of template (home) but it shows the recursive which means it returns empty !

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Sep 23, 2014 @ 09:59
    Steve Morgan
    0

    Hi Tarik,

    Can I just check you've created the generic property bannerHeader in the Master document type so it is inherited by the lower document types (so you can have it on every page?). I've just tested this and it works fine on v7.1.1 and v7.1.6 so I struggled to think what you could have done differently!  

    Looking at your screenshot of your home document type it *looks* like you've somehome recreated these at the Home level *and* you're hoping to inherit these from the master.  I think I've worked out what you've done - can you please confirm it?

    1. Created your home doc type 
    2. Added your generic property bannerSubheader on the home doc type
    3. Thought - don't want to keep having to recreate this on all doc types - I'll create these at the master document type level.
    4. Created them at the master - thus creating a duplicate

    I think the answer here is to delete these generic properties on the Banner tab in the Home document type, they will still exist as they will be inherited from the master as you want - you will probably have to go and re-save and publish your homepage node and then it should work. 

    This is possibly an Umbraco bug that it's let you create duplicate document generic properties that exist in a child but I can't see how it can check.

     

    HTH 

    Steve

  • Tarik 35 posts 106 karma points
    Sep 23, 2014 @ 10:29
    Tarik
    0

    Hi Steve,

    Yes, I confirm that.

    I'm surprised today 3 tabs moved from Home to Master !

    I see to have BannerSubheader in the Home document type is better because some other doc type may not need it (in case I make it in the Master DT).

    Is it impossible to get the property of child doc type from the parent?

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Sep 23, 2014 @ 11:01
    Steve Morgan
    0

    No - it works perfectly but I think your issue was probably a duplicate caused by creating it on the home and then recreating it on the master. I use the nesting of document types only for meta data (e.g. Page title, meta description) and things that are on every page (in practise this is usually not very much at all).

    Nesting of templates is very useful (as you're doing) though you can do this without nesting the document types - a little confusing when you first start but very powerful.

    Steve 

     

  • Tarik 35 posts 106 karma points
    Sep 23, 2014 @ 15:29
    Tarik
    0

    I didn't create a duplicate, Steve. but I found tabs moved to parent doc type "Master"!(how that happened)

    To answer my request, I'm publishing page based on Home doc type.

    enter image description here

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Sep 23, 2014 @ 15:35
    Steve Morgan
    0

    Even if the generic properties belong to the Master that should still work without issue. Your document type for Home is correct - what template do you have set?

  • Tarik 35 posts 106 karma points
    Sep 23, 2014 @ 16:09
    Tarik
    0

    Do you know why tabs moved to parent doc type "Master"?

    What template I set for which element, Steve?

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Sep 23, 2014 @ 16:25
    Steve Morgan
    0

    No - never seen that happen, I'd imagine you've clicked on the wrong node when you created the generic properties rather than it being a bug unless you can recreate this behaviour?

    Something is definitely wrong with what you have setup but it's hard to guess what you could have done. Your template on the homepage should be the home template as you'd expect but it's worth checking to see if that's the issue.

  • Tarik 35 posts 106 karma points
    Sep 26, 2014 @ 21:38
    Tarik
    100

    I found the page was using the wrong Template for document name 'Home' under Content section.

Please Sign in or register to post replies

Write your reply to:

Draft