I need to create an html table on my site that provides results and standings for sporting events for each athlete. This content needs to be changed weekly, thus I want to implement it in umbraco. Is there any way to create a custom data type that's basically a table of data? This table needs to be formated differently on each webpage. Some pages will only show selected columns from the table. What's the best approach for this?
where you can see that the various songs by artists are presented as a table.
In this case a column is not shown if there is no data entered in the whole set (for example not every page has chart position)
This is implemented as a sub-document where all the possible columns are in the document type, and a macro gets all the sub documents of the current page.
This is for the 4.04 (pre 4.5 schema) but would be simple to update to the new schema. In here we see that the second and third line check if there is an entry for the producer or the chart position and sets a variable that then control if the table heading and data cell are written out. All credit for this code goes to LauG who wrote this.
I'd prefer to do this as an XML datatype and I am waiting with interest for the uComponents XML data type, and I also understand the next version of Umbraco will support this too. There is also a good nibble article about how to build your own that I had some success with when I tried it. http://www.nibble.be/?cat=14
Tabular content data type
I need to create an html table on my site that provides results and standings for sporting events for each athlete. This content needs to be changed weekly, thus I want to implement it in umbraco. Is there any way to create a custom data type that's basically a table of data? This table needs to be formated differently on each webpage. Some pages will only show selected columns from the table. What's the best approach for this?
We developed tabular data in this template of this site:
http://www.zman.co.uk/z-clients/chris-potter.aspx
where you can see that the various songs by artists are presented as a table.
In this case a column is not shown if there is no data entered in the whole set (for example not every page has chart position)
This is implemented as a sub-document where all the possible columns are in the document type, and a macro gets all the sub documents of the current page.
This is for the 4.04 (pre 4.5 schema) but would be simple to update to the new schema. In here we see that the second and third line check if there is an entry for the producer or the chart position and sets a variable that then control if the table heading and data cell are written out. All credit for this code goes to LauG who wrote this.
I'd prefer to do this as an XML datatype and I am waiting with interest for the uComponents XML data type, and I also understand the next version of Umbraco will support this too. There is also a good nibble article about how to build your own that I had some success with when I tried it. http://www.nibble.be/?cat=14
Hey,
Have you tried the Dynamic Grid Data Type?
http://our.umbraco.org/projects/backoffice-extensions/dynamic-grid-data-type
Matt
Shiny :) like that - i haven't seen that before - looks useful
Can't say I've tried it, but remember seeing it, and though it sounded like what Eugene was after.
Let us know if you give it a try.
Matt
is working on a reply...