Copied to clipboard

Flag this post as spam?

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


  • k 255 posts 652 karma points
    Oct 15, 2018 @ 14:09
    k
    0

    Nested Templates - Umbraco 7

    Hello,

    I would like to create nested template ex:

    Master - Page 1 - Sub page 1

    I have tried:

    @section content
    {
    @RenderSection("innerContent")
    }
    

    But I am getting an error.

    Can someone please help.

    Thanks,

    K

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Oct 15, 2018 @ 17:10
    Alex Skrypnyk
    0

    Hi Kusum

    You can't create 3 level nested template. But, you can create how many you want partial views.

    So first level - layout(master template), second level - template(view), third and all other levels - partial views.

    Thanks,

    Alex

  • John Bergman 460 posts 1066 karma points
    Oct 16, 2018 @ 01:16
    John Bergman
    0

    I next 3 deep in a few places on our site and haven't had any issues... what have you encountered that makes you say you cannot do it Alex?

  • k 255 posts 652 karma points
    Oct 16, 2018 @ 05:34
    k
    100

    Hello I got the solution :

    Ex :

    @section content { @RenderSection content }

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Oct 16, 2018 @ 08:41
    Alex Skrypnyk
    0

    Hi

    Why do you need to render section inside the section?

    Alex

  • k 255 posts 652 karma points
    Nov 05, 2018 @ 07:43
    k
    1

    Hello Alex,

    I needed to do so because I had two master for my website.

    Regards,

    K

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies