Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hi

I am trying to create the following within couchcms but unsure how to do it, it's a list within a list but will need repeatable regions for each list

Code: Select all
<ul class="custom ps-0">
                    <li>To promote the Pedigree Rabbit and its associated hobbies and welfare standards</li>
                    <li>To protect and maintain the heritage of all recognized pedigree rabbit breeds</li>
                    <li>To promote and continually discover rabbit welfare standards that must be upheld by our members through lifelong support from the BRC, working with welfare organisations to build on research and expertise in this field</li>
                    <li>To promote healthy and ethical breeding practices by our members</li>
                    <li>Build a programme of recruitment and marketing tools that will make the rabbit hobby & rabbit keeping attractive, engaging. Retaining existing and newcomers to the associated disciplines within rabbits</li>
                    <li>To build a culture within the rabbit fancy that will encourage respect for each other, sharing of ideas and a passion for supporting each other in building a foundation on which we thrive in seeing others succeed</li>
                    <li>To develop a programme of education and a culture of engagement & encouragement in support of:
                        <ul>
                            <li>Existing Rabbit breeders and exhibitors</li>
                            <li>New and Existing Pet Rabbit Owners</li>
                            <li>Those involved in activities involving rabbits such as Exhibiting, Pet Keeping, Rabbit Sports & House Rabbits</li>
                            <li>Promote the pathways into exhibition rabbits and build a retention plan once people are involved in the exhibiting hobby</li>
                            <li>Judge’s education and development</li>
                        </ul>
                    </li>
                    <li>Work with our network of affiliated bodies and our regional representatives to connect, build, and deliver the strategic aims of the BRC to existing hobbyists and local communities across the United Kingdom</li>
                    <li>Build technologies and routes to engage with the BRC and the associated hobbies on a 24/7 basis</li>
                </ul>
A list of 'terms' and 'definitions' where 'terms' (first-level) are represented as mosaic tiles, whereas each tile may have a list of 'definitions' (second-level) defined as a repeatable inside. Quite manageable, don't you think?
trendoman wrote: A list of 'terms' and 'definitions' where 'terms' (first-level) are represented as mosaic tiles, whereas each tile may have a list of 'definitions' (second-level) defined as a repeatable inside. Quite manageable, don't you think?


I found something similar to what your talking about mosaic tiles in a post of mine I found from a few years ago

Code: Select all
                <div class="col-md-3">
                    <div class="esc-heading heading-line-bottom lr-line left-heading">
                        <h4><cms:show list_style_two_heading/></h4>
                    </div>
                   <ul class="list">
                       <cms:show_mosaic 'liststyletwo'>
                           <cms:if k_tile_name='liststyletwoitem' >
                               <li>
                                   <strong><cms:show listtwoparentitem/></strong>
                                   <ul>
                                       <cms:show_repeatable 'styletwolist' >
                                           <li><cms:show stylelisttwochilditem/></li>
                                       </cms:show_repeatable>
                                   </ul>
                               </li>
                           </cms:if>
                       </cms:show_mosaic>
                    </ul>
                </div>


Could something like that work? If not have you got a link to the tutorial or sample code of what your mentioning please?
I tried the code I found and currently have the following code

Code: Select all
<cms:editable name='strategic_aims_group' label='Strategic Aims Section' type='group' collapsed='1' order='3' />
<cms:editable type='text' name='strategic_aims_heading' label='Strategic Aims Heading' group='strategic_aims_group' />

<cms:mosaic name='listinlist' label='List' group='strategic_aims_group'>
    <cms:tile name='listsinlistsitem' label='List Item'>
        <cms:editable type='text' name='listparentitem' label='List Parent Item Name' />
            <cms:repeatable name='lists' label='List' group='strategic_aims_group' >
            <cms:editable type='text' name='listchilditem' label='List Child Item Name'  />
        </cms:repeatable>
    </cms:tile>
</cms:mosaic>


Code: Select all
<ul class="custom ps-0">
    <cms:show_mosaic 'listinlist'>
        <cms:if k_tile_name='listsinlistsitem' >
            <li>
                <cms:show listparentitem/>
                <ul>
                    <cms:show_repeatable 'lists' >
                        <li><cms:show listchilditem/></li>
                    </cms:show_repeatable>
                </ul>
            </li>
        </cms:if>
    </cms:show_mosaic>
</ul>


It's outputted it like the following

Code: Select all
<ul class="custom ps-0">
<li>
To promote the Pedigree Rabbit and its associated hobbies and welfare standards<ul>
<li></li>
</ul>
</li>
<li>
To protect and maintain the heritage of all recognized pedigree rabbit breeds<ul>
<li></li>
</ul>
</li>
<li>
To promote and continually discover rabbit welfare standards that must be upheld by our members through lifelong support from the BRC, working with welfare organisations to build on research and expertise in this field<ul>
<li></li>
</ul>
</li>
<li>
To promote healthy and ethical breeding practices by our members<ul>
<li></li>
</ul>
</li>
<li>
Build a programme of recruitment and marketing tools that will make the rabbit hobby &amp; rabbit keeping attractive, engaging. Retaining existing and newcomers to the associated disciplines within rabbits<ul>
<li></li>
</ul>
</li>
<li>
To build a culture within the rabbit fancy that will encourage respect for each other, sharing of ideas and a passion for supporting each other in building a foundation on which we thrive in seeing others succeed<ul>
<li></li>
</ul>
</li>
<li>
To develop a programme of education and a culture of engagement &amp; encouragement in support of:                                <ul>
<li>Existing Rabbit breeders and exhibitors</li>
<li>New and Existing Pet Rabbit Owners</li>
<li>Those involved in activities involving rabbits such as Exhibiting, Pet Keeping, Rabbit Sports &amp; House Rabbits</li>
<li>Promote the pathways into exhibition rabbits and build a retention plan once people are involved in the exhibiting hobby</li>
<li>Judge’s education and development</li>
</ul>
</li>
<li>
Work with our network of affiliated bodies and our regional representatives to connect, build, and deliver the strategic aims of the BRC to existing hobbyists and local communities across the United Kingdom<ul>
<li></li>
</ul>
</li>
<li>
Build technologies and routes to engage with the BRC and the associated hobbies on a 24/7 basis<ul>
<li></li>
</ul>
</li>
</ul>
UPDATE: Think I just worked it out and managed to do it with the code below

Code: Select all
<ul class="custom ps-0">
                    <cms:show_mosaic 'listinlist'>
                        <cms:if k_tile_name='listsinlistsitem' >
                            <li>
                                <cms:show listparentitem/>
                                <ul>
                                    <cms:show_repeatable 'lists' >
                                        <cms:if "<cms:not_empty listchilditem />" >
                                            <li><cms:show listchilditem/></li>
                                        </cms:if>
                                    </cms:show_repeatable>
                                </ul>
                            </li>
                        </cms:if>
                    </cms:show_mosaic>
                </ul>
5 posts Page 1 of 1