Quote:
Originally Posted by un_pogaz
Else, I worked of the idea and so here my proposal:
[/SPOILER]
|
FWIW: I'm currently implementing these changes to the base formatter.
- ids = selected_books()
- name = selected_cell(). Returns the lookup name.
- A 'with' statement that changes the book the template is using for the statement's block. The same local variables are available to the inner and outer block.
Example:
Code:
program:
ids = selected_books();
col = selected_column();
res = '';
for id in ids:
with id:
# prints information from the book with identifier 'id'
print($title, field(col));
res = (if res then res & ',' fi) & field(col);
template('program: print("inside template", $title)')
htiw
rof;
list_remove_duplicates(res, ',')
Internal template functions and stored templates called from inside the 'with' block use the book with id 'id'.
EDIT: I'm also going to implement "show_in_dialog()" that renders an html string.