I would like to use Couch for several projects and I think I am getting the hang of the basic feature set but I am not sure how I can implement the Foundation block grid, something I use a lot. The issue is a multi element repeatable region. In Perch I think I can do it fairly easily with a template but templates in Couch seem to mean a different thing (whole page as opposed to a structured input element). At the moment I am using Mustache to get data from a JSON files as follows:
Mustache populates the Li's then Foundation, along with my CSS, organizes this into a series of responsive vertical blocks picture/name/qualifications/title/bio.
The rather confusing (to me at least...) documentation for repeatable regions/units makes the following statement:
This seems to imply that I have little control over the formatting.
What I really want to do is keep this simple and just use customer loaded data from the admin panel to fill the Li's and then let Foundation deal with the rest.
Is this possible? Is there a better way?
Thanks a lot,
Graham
- Code: Select all
<script id="teamTemplate" type="text/template">
{{#teamData}}
<li>
<img src="images/about/{{teamImage}}" alt="Photo of {{teamName}}">
<br>
<h5>{{teamName}}</h5>
<p>{{teamQual}}</p>
<p>{{teamTitle}}</p>
<p class="left-align">{{teamBio}}</p>
</li>
{{/teamData}}
</script>
<ul id="team" class="large-block-grid-3 medium-block-grid-2 small-hide">
<!-- PLACEHOLDER FOR TEAM DATA -->
<hr>
</ul>
Mustache populates the Li's then Foundation, along with my CSS, organizes this into a series of responsive vertical blocks picture/name/qualifications/title/bio.
The rather confusing (to me at least...) documentation for repeatable regions/units makes the following statement:
Since all the editable regions forming the 'repeatable unit' appear side-by-side in a single row, you'll want to have more control over how wide individual region appears in a row.
This seems to imply that I have little control over the formatting.
What I really want to do is keep this simple and just use customer loaded data from the admin panel to fill the Li's and then let Foundation deal with the rest.
Is this possible? Is there a better way?
Thanks a lot,
Graham