Copied to clipboard

Flag this post as spam?

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


  • k 229 posts 593 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 5272 posts 19275 karma points MVP 3x 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 424 posts 976 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 229 posts 593 karma points
    Oct 16, 2018 @ 05:34
    k
    100

    Hello I got the solution :

    Ex :

    @section content { @RenderSection content }

  • Alex Skrypnyk 5272 posts 19275 karma points MVP 3x admin c-trib
    Oct 16, 2018 @ 08:41
    Alex Skrypnyk
    0

    Hi

    Why do you need to render section inside the section?

    Alex

  • k 229 posts 593 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

Please Sign in or register to post replies

Write your reply to:

Draft