php:using_the_gen_table_data_framework
Differences
This shows you the differences between two versions of the page.
php:using_the_gen_table_data_framework [2021/02/09 11:26] – created genadmin | php:using_the_gen_table_data_framework [2021/02/10 14:48] (current) – genadmin | ||
---|---|---|---|
Line 19: | Line 19: | ||
* prf = prefix, shown before the data. | * prf = prefix, shown before the data. | ||
* pof = postfix, shown after the data. e.g. $table[" | * pof = postfix, shown after the data. e.g. $table[" | ||
+ | * link = Add a html a element around the value linking to what's provided here. | ||
+ | * html = wrap value in html given, replace %%%% with field value. | ||
Here's an example: | Here's an example: | ||
Line 64: | Line 66: | ||
Giving the table definition and the row class, in this case thinorange. | Giving the table definition and the row class, in this case thinorange. | ||
+ | |||
+ | ===== DYNAMIC ===== | ||
+ | |||
+ | |||
+ | Within our loop we sometimes want to dynamically change the contents of a table cell per record. We can do this by simply changing the $table (or whatever you called the array) within the loop. An example would be: | ||
+ | |||
+ | < | ||
+ | |||
+ | in which case for the field CLI, we're wrapping the contents within an input tag. %%%% is replaced with whatever the field content is. | ||
+ | |||
+ | ==== LINKING ==== | ||
+ | |||
+ | Sometimes you may want a particular value to be linked to a destination using the <a> html element. You can do this using " | ||
+ | |||
+ | < | ||
+ | |||
+ | Again, in this instance, %%%% is replaced by the actual field value. | ||
===== TOTALS ===== | ===== TOTALS ===== |
/data/webs/external/dokuwiki/data/pages/php/using_the_gen_table_data_framework.txt · Last modified: 2021/02/10 14:48 by genadmin