01168: Specifying the width of columns
- Description
Hello All, This is sorta a follow-on to my issues in PITS.01166. I'm trying to create a very basic database application without using a database backend via searching a flat text file. So, I'm using Cookbook.TextExtract as my "query engine" and pointing it to a PmWiki page that is my "database". I had been using an Advanced Table, because I have a need for users to add/delete records from the PmWiki Page (my database), but had to abandon that approach because TextExtract wasn't pulling the whole row (since Advanced Tables use the (cell:)"data element" in individual rows).
Petko suggested the use of PageText Variables & a Pagelist, but I found the ADL (Cookbook.AddDeleteLine Recipe) which will allow my users to easily add/delete records on a page. Here's my current issue, I need to have fixed column widths because of the nature of the data. I've added in config.php this string $TableCellAttrFmt
= 'class=col\$TableCellCount';
and created in my pub/css/ directory a "local.css: file with only the three following lines:
table.column td.col1 { width: 30px; } table.column td.col2 { width: 10px; } table.column td.col3 { width: 40px; }
I've made up a test page, and included this Wiki markup:
(:table class='column' border='1' width='30%' align='right' bgcolor='#cccc99' cellspacing='0':)
Jeff | Column Width Issue | Third Column |
When the HTML is being generated, it doesn't appear to include the column specification.
<div class='vspace'></div><table width='100%'><tr class='row1'><td class=col\1>Jeff</td><td class=col\2>Column Width Issue</td><td class=col\3>Third Column</td></tr> </table>
I'm using the Bonny Skin, which I'm thinking might be creating an issue with the CSS, but any help/direction as to how I should proceed would be appreciated. (very much!!) Thanks
Is the problem the generated "col\1" instead of "col1"? You should use $TableCellAttrFmt
= 'class="col$TableCellCount"';
that is '$' without the "\" when in 'single' external quotes and "\$" when in "double" quotes. --Petko February 09, 2010, at 12:44 PM