Copied to clipboard

Flag this post as spam?

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


  • simone manneschi 2 posts 32 karma points
    Feb 19, 2014 @ 10:44
    simone manneschi
    0

    Dynamic templating

    Hi i need some help with umbraco to define dynamic block template. I've the structure described in the image below 

    i want to create a dinamic structure for the investor area like in the next screenshot

    i try to create benefit template as child of investor template and investor template child of Investors template. In that way my customer can dinamically add or remove benefit from investor and investor from Investors. I watched all umbraco tv videos but i don't know how to solve this problem! I'm searching in something similar to:

            @foreach(var page in CurrentPage.Children){
                <li>!!!@RenderChildTemplate(page)!!!</li>
            }

  • simone manneschi 2 posts 32 karma points
    Feb 19, 2014 @ 11:43
    simone manneschi
    0

    Ok i found a way to accomplish that! I deleted al block template and converted it to partial view! than i render them using Html.Partial ! it's working but i'm not sure that it is the correct way to do 

  • Matt Linsenbardt 24 posts 147 karma points
    Feb 19, 2014 @ 22:20
    Matt Linsenbardt
    100

    Hi Simone,

    Another option is to keep the templates and use the Umbraco.RenderTemplate() helper.

    @foreach(var page inCurrentPage.Children){
               
    <li>!!!@Umbraco.RenderTemplate(page.Id)!!!</li>
    }
Please Sign in or register to post replies

Write your reply to:

Draft