This project is read-only.

How to render content into a table

Topics: General
Jul 3, 2014 at 6:55 PM
I'm having trouble figuring out how to render content into a table. My difficulty stems from the fact that the content is rendered automatically by taxonomy term in a paginated list of 10 Projects. I don't know how to access this list to wrap it in some table html, and wrap each field in a cell <td> tag.

The content type is Project, and I am trying to render a list of projects viewed by a Taxonomy Term. The three fields I am trying to render into the table are the the "funded" taxonomy field, the Parts title, and a content picker part called "project managers"

Here is what the shape tracer shows:

Here are the three elements of a single row in the table:




Here is what I have tried: Creating a three-columned zone in my layout file:
 @if (Model.ThreeColTable != null) {
            <table class="table table-striped">
                        <th>Project Name</th>
                        <th>Project Manager</th>
...then placing elements with
  <Match DisplayType="Summary" ContentType="Project">
    <Place Fields_TaxonomyField-Funded="/ThreeColTable:1"/>
    <Place Parts_Title_Summary="/ThreeColTable:2"/>
    <Place Fields_ContentPicker-ProjectManagers="/ThreeColTable:3"/>
I tried making a wrapper file called "cell_wrapper.cshtml" with this content:
Then wrapping my elements in in order to wrap each element in a cell, but that didn't take:
  <Match DisplayType="Summary" ContentType="Project">
    <Place Fields_TaxonomyField-Funded="/ThreeColTable:1;Wrapper="cell_wrapper" />
    <Place Parts_Title_Summary="/ThreeColTable:2;Wrapper="cell_wrapper" "/>
    <Place Fields_ContentPicker-ProjectManagers="/ThreeColTable:3;Wrapper="cell_wrapper" "/>
I have also tried overriding the parts with template files and trying to wrap the fields in html in different ways, but I'm not having any luck there either.

Am I making this way to complicated? How do I render content in a table?