Copied to clipboard

Flag this post as spam?

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


  • foo 2 posts 82 karma points
    Oct 16, 2015 @ 13:58
    foo
    0

    Own document type for Layout page, ignored by content structure

    Hello everyone,

    I am very new to Umbraco and just did my first installation. Due to the documentation available through the internet, I think I have already a basic idea of how to build pages.

    But there is currently still one question I don't have an answer for. Maybe you guys can help.

    Let's assume I have the following structure for my document types:

    • Layout
      • Home
      • Contact

    My understanding is that this structure has nothing to do with how my content will later be displayed. It is only about inheriting properties and to control which type can be created later in the content section underneath another.

    Now I created three templates:

    • Master
      • Home
      • Contact

    Master is the master template, so I don't have to repeat my header navigation and footer. Inside my Home and Contact Template I can, thanks to my document types Home and Contact, define any properties I need displayed at the pages Home and Contact.

    Now I have in my Master template, let's say in the navigation, a logo. I want the Editor to be able to edit/change that logo. Currently I have to change this manually in the Master template.

    How can I make this happen? How can I create a document type that is only for my Master template?

    Given this Content structure:

    • Home (of document type Home "/")
      • Contact (of document type Content "/contact/")

    I think I need an additional node above Home, like:

    • Layout (of document type ?)
      • Home (of document type Home "/")
        • Contact (of document type Content "/contact")

    But now Layout would become the url "/", right? But the starting point should be Home.

    I hope you can understand what my problem is. Thank you all for taking time to read and maybe answer this.

    Best regards from germany

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Oct 16, 2015 @ 20:09
    David Brendel
    100

    Hi foo,

    welcome to our.

    You don't need a document type for your master view.

    Normally i create generic properties for a logo or such things in the top most node if my website.

    Then you can use the GetPropertyValue method to get the data by setting the second parameter to true. This indicates usage of recursive propertys.

    Hope that gets you startend.

    Regards David

    And also greetings from germany ;)

  • foo 2 posts 82 karma points
    Oct 19, 2015 @ 08:09
    foo
    0

    Good morning,

    first, thanks for your kind words and your reply. :)

    I had some more questions, but I think I could all answer them by myself while typing them. :)

    Thanks again, you really helped me.

    Best regards

Please Sign in or register to post replies

Write your reply to:

Draft