Copied to clipboard

Flag this post as spam?

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


  • John Renz 39 posts 177 karma points
    Dec 14, 2016 @ 10:45
    John Renz
    0

    Master Page (CMS defined contents) are not reflected on child pages

    Hi Guys, currently I am on development with Umbraco as CMS. Upon creation of 2nd Page (Dashboard), it does not inherit those CMS/Umbraco defined contents like logo and footer text. How can I resolved this? Thank you!

    enter image description here

    enter image description here

    enter image description here

    enter image description here

  • John Renz 39 posts 177 karma points
    Dec 14, 2016 @ 13:35
    John Renz
    0

    UPDATE:

    Per checking, above problem occurs when I create the content editor for Dashboard. When I delete the content, the logo and footer text are shown again. How can I resolved it? Thank you.

  • Nik 1599 posts 7179 karma points MVP 6x c-trib
    Dec 14, 2016 @ 15:10
    Nik
    0

    Hi John,

    Can you show use the code in your master page that renders out the footer and that which renders out the logo. I suspect the code there isn't behaving in a recursive manor and as such isn't finding requested content.

    Thanks,

    Nik

  • John Renz 39 posts 177 karma points
    Dec 14, 2016 @ 15:24
    John Renz
    0

    Hi Sir Nik,

    Sir Code of Logo and Footer Text is located only on Main. Content was shown on Home, but it was not shown on Dashboard. Thank you for your reply Sir.

    enter image description here

    enter image description here

  • Nik 1599 posts 7179 karma points MVP 6x c-trib
    Dec 14, 2016 @ 16:13
    Nik
    0

    Okay, so for your logo I would change the code to be as follows:

    @if(Model.Content.HasValue("logo", true))  //This will do a recursive check so look up the document tree  for the property.
    

    Also you will need to do Model.Content.GetPropertyValue

    I'd also use Model.Content.GetPropertyValue

    Let me know if that solves your issues.

  • John Renz 39 posts 177 karma points
    Dec 15, 2016 @ 01:24
    John Renz
    0

    Hi Sir, sadly it does not solve the problem. The logo still does not shown on dashboard, and footertext is shown as below.

    Sir the logo and footer are shown, but when I create a Content editor for the dashboard, that is when it were not shown.

    enter image description here

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Dec 15, 2016 @ 06:54
    Dennis Adolfi
    102

    Hi John.

    Looking at your Content structure in your original post, your "Dashboard" node is not a child node of "Home", they are both on root level, is that correct?

    If you want your dashboard page to inherit the logo and footer from your home page, the dashboard needs to be a child of "Home". Try moving your "Dashboard" to under the "Home" node. (Make sure before doing it that your Home doctype allows children of the type of your dashboard, otherwise you won't be able to move it)

    After you've made sure that the dashboard is a child of home, then you need to add the recursive parameter whenever you use the methods HasProperty("alias", true), HasValue("alias", true) and GetPropertyValue("alias", true).

    Best of luck!

  • John Renz 39 posts 177 karma points
    Dec 15, 2016 @ 09:37
    John Renz
    0

    Hi Sir Dennis Adolfi, I was able to show the logo and footer text. Thank you so much!

    Another question Sir, upon creation of Dashboard as child of the Home, Sir all the content editor fields of Home are shown on Dashboard editor board. How can I removed it? Thanks!

    enter image description here

    enter image description here

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Dec 15, 2016 @ 09:46
    Dennis Adolfi
    1

    Hi John. Glad i could help. :)

    Unfortunatly, since your Dashboard doctype are inheriting your Home doctype, you can't prevent the Home properties to be shown on your Dashboard, that's how the inheritance work.

    If you dont want your Dashboard to inherit from Home, you need to create a new Doctype directly under Document Types folder in the Settings section, so it does´nt inherit any other doctypes.

    Also you should probobly have a look on Compositions. Blake Clerke wrote an awesome post about the differences between Compositions and Inheritance that you should read: http://letswritecode.net/articles/document-type-compositions-in-umbraco/

    Best of luck to you!

  • John Renz 39 posts 177 karma points
    Dec 15, 2016 @ 13:08
    John Renz
    1

    Hi Sir Dennis,

    Sir thank you so much, my problem is now resolved. You cleared my mind on what to do. Here what I have done Sir. On the document type, all are all in 1 hierarchy but Main do allowed Child Node Types to Dashboard and Home. On the template they are still nested as well as on the content. With these there are no duplication of content fields. Thank you so much!

    enter image description here

    enter image description here

    enter image description here

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Dec 15, 2016 @ 18:20
    Dennis Adolfi
    1

    Awesome, glad that it worked out for you John and thank you for sharing the results! Best of luck with the rest of your site!

    Have a great day!

  • John Renz 39 posts 177 karma points
    Dec 16, 2016 @ 01:53
    John Renz
    1

    Hi Sir, thank you also! Super thanks from the Philippines! God bless! :)

Please Sign in or register to post replies

Write your reply to:

Draft