You can download this page by going here and grabbing 'example 12'
In this case study we will look at how a real-estate agent might use gtable. Let's say you manage properities you are trying to sell and you would like a web presence so when folks go to your site they can see a list of current houses for sale.
A great way to do this is with gtable. you can store the actual for-sale house information on a spreadsheet with google docs and have an admin maintain it (update price and sold status) without requiring them to republish your site!
In this case the spreadsheet looks like this
There are 4 columns (Asking Price, Address, Square Feet, Picture and Comments). The "Picture" column contains HTML links to pictures of the houses for sale so you want to make sure those are displayed properly.
@gtable((pegfyTc8f6LbNrKcH_p7fNA, id:table1,
theme:muffin, html:Picture, header:true))
| housenumber | askingprice | address | squarefeet | picture | comments |
|---|---|---|---|---|---|
| 1 | $495000 | 123 Any Street, Pacific Grove, CA | 1500 | ![]() |
Cozy |
| 2 | $1500000 | 431 Some Street, Carmel, CA | 4000 | ![]() |
A great fixer-upper |
| 3 | $195000 | 433 This Street, Santa Rosa, CA | 6000 | ![]() |
Needs TLC |
Not bad for a first attempt but you decide that you want a bit more compact table. Also the 'Comments' and 'House Number' is really for internal use, you don't want to publish it to the web so we should hide that column and you'd like to see it sorted by price (without requiring your assistant to have to sort it)
@gtable((pegfyTc8f6LbNrKcH_p7fNA, id:table2, theme:lab-report, html:Picture, header:true, ignore:Comments, sortby:askingprice))
| askingprice | address | squarefeet | picture |
|---|---|---|---|
| $195000 | 433 This Street, Santa Rosa, CA | 6000 | ![]() |
| $495000 | 123 Any Street, Pacific Grove, CA | 1500 | ![]() |
| $1500000 | 431 Some Street, Carmel, CA | 4000 | ![]() |
Finally although this is a very small spreadsheet (3 housees) you have big dreams and you'd like a way for customers to search. No problem using dynamic syntax you can specify the search criteria at runtime. In this case we make the default values 'match everything' so when it first comes it shows all houses but after a user specifies a criteria they see only the ones that match
| askingprice | address | squarefeet | picture |
|---|---|---|---|
| $195000 | 433 This Street, Santa Rosa, CA | 6000 | ![]() |
| $495000 | 123 Any Street, Pacific Grove, CA | 1500 | ![]() |
| $1500000 | 431 Some Street, Carmel, CA | 4000 | ![]() |
Plugin Updates RSS
Feed


