Copied to clipboard

Flag this post as spam?

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


  • pat 124 posts 346 karma points
    Jan 11, 2017 @ 13:52
    pat
    0

    best practice to generate jquery tabbed web pages

    Hi all , I want to create a tab page with unlimited tabs. The only way I can think is create a document type to a first tab and then create a another document type to add other tabs . In first tab page template call content of other tabs and generate html to build jquery tab page.

    Is there any other way in umbraco 7 that I can use only one document type to achieve this ?

  • David Peck 687 posts 1863 karma points c-trib
    Jan 12, 2017 @ 17:10
    David Peck
    0

    Nested Content from Umco. You create can create all the document types you like, for you different tabs, and then within the same property you can add and remove them. Alternatively Archetype, which is the same thing give or take.

  • pat 124 posts 346 karma points
    Jan 16, 2017 @ 15:23
    pat
    0

    I have achieved what I wants using below code in template.

    I have tab document type and Tab Page Item page and both document types has tab name text field and content grid.

    and in permissions I allow tab page Item allow child on tab page.

    then in template I have added below code and It generate by tabs

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = "Master.cshtml";
    }
    <div id="tabs">
        <ul>
        <li><a href="#tabs-1">@CurrentPage.TabName</a></li>
        @{
            var countlink=2;
            foreach ( var child in CurrentPage.Children )
            {
                <li><a href="#tabs-@countlink" >@child.tabName</a></li>
                    countlink++;          
            }
        }
        </ul>
        <div id="tabs-1">
    @CurrentPage.GetGridHtml(Html , "content", "patIc")
    <div>
            @{
                var count=2;
                foreach ( var child in CurrentPage.Children)
                {
                    <div id="tabs-@count">
                        @child.GetGridHtml(Html,"content", "patIc")
                        @{count++;}
                    </div>        
                }
            }
    
    </div>
    
Please Sign in or register to post replies

Write your reply to:

Draft