Copied to clipboard

Flag this post as spam?

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


  • Andy Hsieh 6 posts 97 karma points
    Mar 09, 2017 @ 01:43
    Andy Hsieh
    0

    creating content node

    Hi all,

    I am new to Umbraco. I am trying to follow the instruction under Our Umbraco - Documentation to create my first document type, template, and content node.

    https://our.umbraco.org/documentation/Tutorials/Creating-Basic-Site/Document-Types

    https://our.umbraco.org/documentation/Tutorials/Creating-Basic-Site/Creating-Your-First-Template-and-Content-Node

    I followed all the instructions only without entering the codes inside the template (because I don't know where is the "index.html from Initializr template"). However, after all the steps have done, there is no "Homepage" for me to create in content. Is it because I did not enter those codes in the template? Can anyone provide me the codes? (it does not have to be the same codes as the tutorial as long as it works)

    Thank you all so much!

    Best regards,

    Andy

    Hi all,

    I just checked the instruction again, and I did check "Yes - allow content of this type in the root" under Permissions.

    However, when I installed Umbraco, there is a sample template called Landing Page, and I noticed that it does not check the "Yes - allow content of this type in the root" box, and it does show under Content Create. Therefore, I tried both ways to checked and unchecked the box, but both aren't working. So I guess it doesn't matter to check the box, is that correct?

    Thanks!!

  • Andy Hsieh 6 posts 97 karma points
    Mar 09, 2017 @ 08:39
    Andy Hsieh
    0

    I just found out the solution.

    You have to check "Yes - allow content of this type in the root" under the Permissions of the new document type (Homepage in this case), and then you have to go to "Home" document type, under the Permissions, you have to add "Homepage" as child.

  • Micha Somers 134 posts 597 karma points
    Mar 09, 2017 @ 09:09
    Micha Somers
    0

    Hi Andy,

    The Initializr's index.html code should be in the package that can be found here.

    In order to start with a very simple example (let's say a 1-minute Hello World version; just to see it working), you can do the following...

    1 minute example - Umbraco Hello World

    => In section Templates: Create a new template: HelloWorld

    Use as template code:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = null;
    }
    <html>
    <body>
        <div>Hello Umbraco World!</div>
    </body>
    </html>
    

    Save the template

    => In section Document Types: Create Document Type without a template with the name: HelloWorld

    Click on Permissions and check: Yes - allow content of this type in the root

    Click on Templates, and Choose default template: HelloWorld

    Save the Document Type

    => In section Content, Create an Item under Content, you should be able to select: HelloWorld

    Name it: HelloWorld

    Select a template (in case it did not do that by default): HelloWorld

    Save and Publish

    => If all went fine, you should be able to view the HelloWorld page.

Please Sign in or register to post replies

Write your reply to:

Draft