1.8 Query Grid not creating table

Topics: Customizing Orchard
Apr 25, 2014 at 3:24 AM
Hi,

Using 1.8 I create a new Content Type (just 2 input fields per content type) and then 2 Content Items Then I just create a query, attach the Content Type and I can view the Content Items as an unordered list. All good.

I then add a Layout as a 3 column grid, just using a Summary Display Type. I leave all other fields as per default null values.

I simple create a projection, add the query (3 column), add the projection to the menu and run the query.

Looking at the rendered HTML, no table elements are visible? The same approach works in 1.7.2.

Regards
Paul
Apr 25, 2014 at 11:45 AM
OK, I worked it out.

Unless you explicitly place element tags table tr td within the grid construct the table elements will not be renounced.

PK
May 22, 2014 at 6:11 AM
Same here. I have tried many times to create a grid layout with projection, but orchard keeps rendering all content items as list. Your post saved me hours :). Thanks a ton.
May 22, 2014 at 7:14 AM
Then this must have been changed in 1.7.3 since we noticed that the default behavior changed as well (as in, everything broke..).
Aug 5, 2014 at 5:28 PM
Hi Paul,

"Unless you explicitly place element tags table tr td within the grid construct the table elements will not be renounced."
I have also tried to create a grid layout with projection. Could you tell me how can I show the table elements? In the file Placement.info?
(Sorry, i'm newbie in Orchard)

Best Regards
Aug 6, 2014 at 5:23 AM
Hi Mate,

Once you have your Content Type, you can create a query and add the Content Type, using Filters, to the query. After this add a Layout and select a Grid (as many columns as you require). In the HTML properties explicitly add table tr and td, as indicated by the comments. Run the query and you can see the table results.

Only use placement info with Alternatives to customise the table view.

PK
Aug 6, 2014 at 8:50 AM
Hi

I got it. It works like a charm. Thanks a lot.