Hi all.
I am trying to get the listbuilder work in order to display
some photos. It is basic but probably I am missing the point
here. I searched the forums but could not get the help I need.
Basically, I upload some photos through ad_form and I save
the thumbnails and original pictures in say mypackage/www/images/. What I want to do is to be able to see
a thumbnail of the every picture using the listbuilder.
I followed the examples in the docs and this the code of the listbuider:
template::list::create -name recipes-list \
-multirow photos \
-key item_id \
-actions {"Add a photo" add_photo } \
-bulk_actions { "Remove checked photos" "photo-delete" "Remove checked photos" } \
-elements { \
item_id { label "Photo_ID" } \
title { label "Title" display_col title } \
filepath { label "FilePath" display_col filepath2 } \
recipe_description { label "Description" display_col recipe_description } \
delete {
link_url_col delete_url
display_template {
}
sub_class narrow
}
edit {
link_url_col edit_url
display_template {
}
sub_class narrow
}
view {
link_url_col view_url
display_template {
}
sub_class narrow
}
}
db_multirow \
-extend {
delete_url
edit_url
} photos select_photos {
select id as item_id, title, filepath,
photo_description from photos
} {
set delete_url [export_vars -base "photo-delete" { item_id } ]
set edit_url [export_vars -base "add_photo" { item_id } ]
set view_url [export_vars -base "view" {item_id } ]
}
Obviously, the filepath points to the picture thumbnail.
How do I get it to display the thumbnails in a list?
The code display_template {....} works only for static gifs.
Thank you so much in advance..