Rapidweaver is a website authoring program for the Mac. I have learned a lot of advanced tricks and like to share some new things when I learn them, in a step-by-step format.
Suppose you have a database or spreadsheet with lots of records that you want to share on your website, but do not know the best way to go about it. FYI if you just want a simple table of the data to put on your page, there is a website that will convert a comma-delimited file to a simple table, at Textfixer.com.
Now there is a way to use a mySQL database on your site using RapidTable, although this means you have to be able to do some basic configurations, but nothing too hard.
First of all, the advantage of a database is that you can display a lot of records in a table that will break the data into a set number of lines, create links to additional pages, and have a simple search function for your users to sort the data. I am going to use an example of a database that I wanted to put online of my dance music collection. As a former dj, I have numerous records that have been entered into a database. I wanted to display the Artist, Title, Label, and Year in a searchable table. The database has 800 to 1000’s of listings, depending on how I filtered the info, and that was just too much work to put on a webpage, much less have someone search for a particular artist. So I set up a mySQL database on my hosting service: Go to Setting Up an SQL Database.
After setting up my database, I downloaded RapidTable and installed it into RapidWeaver [update 12-2014: No longer available at the original page, but is at Softpedia]. Restart RW, then select a new page using RapidTable. You are presented with a setup page for Server, Username, Password, Database Name and Table. The first four should be available from your mySQL admin page. Table: Now when you set up the database, you created a table, ‘music’ was from my example. FYI a database can have many tables. Enter the info and then go to the configuration tab. Under fields, enter the names of the fields you want to display, with commas and no spaces: artist,title,label,year [They can be in any order, and not all fields of the table have to be used, just make sure the names are exactly the same as when you created the table fields]. Under Table titles, enter what you want displayed at the top of each column in the same order as the listing above: Artist,Song Title,Label,Year Then enter the number of lines to display on each page, I chose 50.
The next tab is the Header page. You can enter text, but to get line breaks and size you will have to use HTML code. Do not worry about the CSS tab yet. Now, you have to publish your page to your webhost before you can see the results, which will look a little strange, but we will get to that shortly. First let’s see if everything is configured correctly. After publishing, this is what I got:
Yeah! The data is there, but of course it looks strange. There is a post on the RapidTable page that explains how to fix this, but it confused me a little, so this is what you have to do:
Go to the CSS tab. DO NOT PANIC! It may look scary, but all is not lost. I suggest you copy the whole page and save the text to a file in case you have to restore it if you really mess things up The fifth full line is this:
th.rwt-header border: #004d9c 1px solid; padding: 4px; background: #add8e6; [I deleted the brackets so the html will not mess up my page]
You are going to change the th.rwt-header tag. You need to append each field of your table to this tag plus a dash, like this for artist, title, etc, then a space, a comma then the next field.
th.rwt-header-artist, th.rwt-header-title, th.rwt-header-label, th.rwt-header-year
Next, you are going to change the th.rwt-cell-0 and th.rwt-cell-1 tags in the same way. They are on the next lines just search for them. You need to append each field of your table to this tag plus a dash, for artist, title, etc, then a space, a comma then the next field, just like above. Here is a screenshot of my text with the relevant changed tags underlined. This is the only thing I added:
Your page should now look correct with the alternate lines:
If you know CSS you can change the colors of the lines, etc. Now one more thing. See the little V button to the left? Click it and you get a search box! You can search on one or more fields, and no wild cards are needed, ie DON will bring up Madonna and Donald, etc. Just enter your search text and hit ‘enter’. You may want to note that to your visitors, since it may not be obvious to them.
Hope this has been helpful! Good Luck!