Forum OpenACS Q&A: Re: List builder, db_multirow -extend and <include>
Posted by
Sean Redmond
on 08/14/04 10:16 PM
Alright, I found half my answer here. Use display_template. So this should be possible
template::list::create \
-name shares \
-multirow shares \
-key share_id \
-elements {
id {
label "Id"
}
id2 {
display_template {
<include src="share-member-list"
share_id="@shares.id2@">
}
}
}
....
But it doesn't work. If, instead of include, I use something like <span id="@shares.id2@"></span> I get the expected output, but with include:
can't read "__adp_stub": no such variable
while executing
"template::util::url_to_file "share-member-list" "$__adp_stub""
invoked from within
"if {[string equal "[ad_quotehtml [lang::util::localize ${shares:rowcount}]]" "0"]} {
append __adp_output "
<tr class=\"list-odd last\">
<td ..."
("uplevel" body line 39)
invoked from within
"uplevel {
variable ::template::parse_level
lappend ::template::parse_level [info level]
set __adp_output ""
append __adp_output "<table ..."
("eval" body line 1)
invoked from within
"eval "uplevel {
variable ::template::parse_level
lappend ::template::parse_level \[info level\]
$code
template::util::lpop ::templa..."
(procedure "template::adp_eval" line 4)
invoked from within
"template::adp_eval __list_code"
(procedure "template::list::render" line 77)
invoked from within
"template::list::render -name "shares" -style """
invoked from within
"append __adp_output "[template::list::render -name "shares" -style ""]""
("uplevel" body line 18)
invoked from within
"uplevel {
set __adp_output ""
set __adp_master [template::util::url_to_file "[ad_parameter -package_id [ad_conn subsite_id] DefaultMaster ..."
(procedure "template::code::adp::/var/lib/aolserver/ourcsa/packages/csa/..." line 2)
invoked from within
"template::code::${template_extension}::$__adp_stub"
(procedure "template::adp_parse" line 68)
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."
I know it's not a problem with the included file because it works if I include it normally, it only fails within template::list::create