Copied to clipboard

Flag this post as spam?

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


  • GF 4 posts 74 karma points
    Aug 10, 2018 @ 19:27
    GF
    0

    How to add custom document type as child of starter kit homepage?

    Hello everyone,

    Goal: Create a custom RenderMvcController to create a custom page in my navigation panel.

    Problem: The custom content I've created doesn't get the proper website design from the main site, i.e. missing footer information and navigation panel.

    What I'm trying to do to solve it: Putting my Content based on my Custom Template under the pre-installed "Home" Content. enter image description here I'm finding it quite difficult to get started using Umbraco, and I'd really appreciate your help. I'm creating an Umbraco website based on StandardWebsiteMVC starter kit in Umbraco 6.2.6.

    I've successfully installed Umbraco, the starter kit and created some content. So far so good!

    Now, to create the custom page this is what I've done:

    1. Created a controller class that inherits from RenderMvcController and put it under App_Code.
    2. Created a model class that inherits from RenderModel and put it under App_Code\Models.
    3. Created a Document Type called "Calendar" with an alias equal to the controller class (minus "Controller" suffix). I enabled "Allow at root" to test it out.
    4. Created a Template called "Calendar" with "SW_Master.cshtml" as Layout. It has my custom model passed as generic argument for UmbracoViewPage.
    5. Created a Content page based on my Calendar template and put it under root content.

    Now, I can go to mydomain/Asd invoke my controller, return base.Index with my custom model and extract data from it in my template. However, the page is missing a lot of style from the base website, e.g. footer information and navigation panel.

    I thought that if I could move my content inside the pre-installed "Home" content (with the "Homepage" document type), I'll get the proper design. I just can't find anywhere to edit the "Allowed child nodetypes" of the "Homepage" document type - it isn't visible under "Settings" -> "Document Types".

    How can this be achieved? Is it even the proper approach?

    I hope you can shed some light on how to do this or point me to some documentation to solve it. I'm new to Umbraco and web development in general, but I have good experience within software engineering.

  • Jon R. Humphrey 164 posts 455 karma points c-trib
    Aug 10, 2018 @ 23:26
    Jon R. Humphrey
    0

    GF,

    First, welcome to Our, it's a great place and I hope you find loads more information on all things Umbraco to help you!

    Second, and please forgive me, but why are you using v6 when we're currently on v7.11.1?

    Now, this might not resolve your current issue, but before we delve into the rabbit hole that is v6, if we can determine the restrictions of your situation, then there's a higher likelihood we can help you!

    Look forward to your response!

    Kind regards, and again welcome to Our!

    Jon

  • GF 4 posts 74 karma points
    Aug 11, 2018 @ 08:19
    GF
    0

    Hi Jon,

    Thanks for the welcome!

    I'm running 6.2.6 because that's the latest version I could identify that runs on ASP.NET 4.0, which is the version my webhotel has. It's an annoying limitation, but I'm afraid I'm not in a position to do much about it - it's not even my own domain, I'm helping someone.

    According to this thread 7+ requires .NET 4.5.

  • Magnus Eriksson 122 posts 362 karma points
    Aug 24, 2018 @ 07:48
    Magnus Eriksson
    0

    Hello,

    If you have a hosting provider that doesn't support .Net 4.5+ I would very much advice you (if possible) to move to a better hosting provider rather than starting a new project on a really old version.

    Regards, Magnus

  • GF 4 posts 74 karma points
    Aug 23, 2018 @ 16:19
    GF
    0

    Any ideas? :-)

  • GF 4 posts 74 karma points
    Nov 01, 2018 @ 19:26
    GF
    0

    This was fixed by finding the "Homepage" Document Type and adding the "Calendar" type as an "Allowed child nodetypes". I simply couldn't find the Homepage document type - it was a child to Content Master :-)

Please Sign in or register to post replies

Write your reply to:

Draft