0
votes

I'm trying to render a table using a Marionette CompositeView/ItemView and am running into issues with the jade template. The table "shell" is rendered correctly for the composite view but the template for the item view only renders the first table cell in the tbody section. Here is what I have.

CompositView Template

div.span5
   table.table.table-striped.table-condensed
      thead
        tr
            th.span2
            th.span4
      tbody

ItemView Template

td Some Title
td A Description

If I add the tr tag to the ItemView template, then both columns are rendered. But I don't want that because the tr tag is already added by the ItemView. Any ideas why the second column doesn't get rendered?

Thanks!

1
do you have this line " tagName : 'tr' " , in your itemView?Rayweb_on
Yes, I have configured 'tr' for the tagName.Gentenator
Do you have the same problems using raw HTML?gustavohenke

1 Answers

0
votes

I found an alternative method to solve this issue. I render the tr tag in the ItemView template, not by specifying it with the ItemView tagName property. Then in the ItemView onRender function, I remove the default div tag that the template is wrapped in. Maybe not the ideal solution but works for what I need.