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!
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.
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.
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).
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!
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.
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!
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!
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.
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
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.
Okay, so for your logo I would change the code to be as follows:
Also you will need to do Model.Content.GetPropertyValue
I'd also use Model.Content.GetPropertyValue
Let me know if that solves your issues.
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.
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!
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!
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!
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!
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!
Hi Sir, thank you also! Super thanks from the Philippines! God bless! :)
is working on a reply...