Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Exporting to an html table (Read 5059 times)
Stefan Keydel
Full Member
*
Offline



Posts: 20
Austin, Texas, US
Exporting to an html table
Jul 23rd, 2009, 12:58pm
 
I've managed to use Tinderbox for more than 5 years without any need for its export functionality, but now I'd like to be able to export a set of notes to an html table. Would anybody be willing to share an export template that exports each note into a table with a column for each key attribute?
Back to top
 
 
WWW keydel@mac.com   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Exporting to an html table
Reply #1 - Jul 23rd, 2009, 1:12pm
 
This will be MUCH easier if you simply know the note's key attributes in advance.  

Let's say they're $Price and $Quantity.  

Here's the template for the container:

    <table>
         ^children(rowTemplate)
    </table>

And here's the "rowTemplate" we use for each child in the container, which becomes a row in the table:


<tr>
   <td> ^get(Name) </td>
   <td> ^get(Quantity) </td>
   <td> ^get(Price) </td>
</tr>

This should be easy enough to extend and revise.
Back to top
 
 
WWW   IP Logged
Stefan Keydel
Full Member
*
Offline



Posts: 20
Austin, Texas, US
Re: Exporting to an html table
Reply #2 - Jul 23rd, 2009, 1:22pm
 
This is perfect, Mark; thanks!

Stefan
Back to top
 
 
WWW keydel@mac.com   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Exporting to an html table
Reply #3 - Feb 1st, 2010, 1:17pm
 
Off-Topic replies have been moved to this Topic.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print