Handling tables in 5.5 Pro

Hi folks,

I maintain a site which has lots of tables which are continually having to be renewed. How do I select most but not all of the cells so as to delete contents?

Also, I want to centrally align text in all cells, both vertically and horizontally. Is there quick way to do this.

This beginner would really appreciate help with these issues. Thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you are importing your data from a CSV file or similar, then you will want to delete the cells (not just their content) from all but one row of the table, then place your text cursor in the top-left cell and import the new data. This can be very quick to do once you grasp the concept. (Freeway auto-generates rows based on the content of your source file.)

Freeway’s cell data styling is difficult to manage using the built-in styling tools, but easy to manage with a little bit of external CSS (external in the sense that it’s not made using the built-in styling tools).

Click once on the table, and look in the Inspector in the Name field. Write down or memorize what is there, including any case-sensitive differences. Let’s say it reads dataTable at the moment. In the Page / HTML Markup / (Before ) dialog, paste in the following:

<style type="text/css">
#dataTable td {
  vertical-align: center;
}
#dataTable td p {
  padding: 0;
  margin: 0;
  text-align: center !important;
  font: 11px/1 Verdana sans-serif;
  color: #333;
}
</style>

Let’s look at what that does. First, before we do, you need to remove all of the local styling from the existing content. This is going to be a tedious click, select all, Styles palette → click [Remove Style] at the top of the list (I may have that wording wrong, not in front of it at the moment). You may want to skip ahead to the part where I explain how to delete a whole bunch of rows and columns at once. Once you have done this, all of your text will be 16px Times in Freeway’s design view, but when you look in your browser, it will be 11px Verdana. (Or whatever you substitute in your style sheet.) It will all be centered vertically and horizontally, and will stay that way when you update the table later.

You can change any aspect of this style declaration later, make it a different font or color or whatever. As long as you don’t rename the table in the Inspector, this style will still apply to your table and its contents. You can do other neat tricks like alternating row striping in this style block, and updating the content won’t affect that at all. If you stick with the Freeway-provided technique of locally styling the individual table cells, you will be stuck doing that all over again each time you update your data, or worse, you will be stuck updating each cell of your data by hand.

So on to updating a table. First, export your data from Excel or Numbers as a CSV file or a TSV file (comma-separated values or tab-separated values). This makes updating the table data incredibly quick. To remove a wide range of cells in the fewest number of clicks, do this: click in the top-left cell, and shift-click in the bottom-right cell of the rows you want to delete. Press the delete key once to combine all of the cells together (maybe it’s Command-Delete, again, not there, can’t check). Press delete again to remove the jumbo combined block from the table. Now, since you have reserved one row of the table to act as your starter row, clear out the content from each cell in that row with Command -B, then place your text cursor in the top-left cell. From the main menu, choose File / Insert, and then use the format picker to choose either CSV or TSV format according to how your data were exported. Navigate to that file, and import. Your table will rebuild to suit the content.

Since you styled the table itself, and not the individual content cells, you are now done.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walt for your comprehensive reply. I shall take a while to digest it all. I don’t even know what a CSV file is. In any event, I shall probably be filling the table with text typed manually.

As for CSS, try as I might, I cannot get my head around that.

Why on earth doesn’t FW let the user select all the cells and apply alignment as required? (That’s a rhetorical question. You don’t have to answer it unless you wish.)

Thanks again.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Why on earth doesn’t FW let the user select all the cells and …

… because it’s weird - exactly the same weirdness than fiddling in inspector for hunting a usual paragraph rather setting one p-Tag style and done.

A style is rock solid. Once set, a client can change her mind whenever she likes - one change altering everything the style is hooked to.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options