Writing a piece of code where a listtemplate is not aware of page variables, I noticed the fact that passing product_ids through include calls do work and the values show in the ADP page.
However, there are no such variables within listtemplate's scope.
i. passing product_ids through the include:
<include src="/packages/evex-event/lib/events" product_ids="@product_ids@">
ii. As expected, the value of product_ids arrives in .../lib/events, and showed in the browser (adp file)
ex.
@product_ids@
...
<listtemplate name="events"></listtemplate>
However, when used within a listtemplate it returns "no such variable". See the chunk of code written in the ad_proc template::list::create
...
action {
label "Acoes"
display_template {
<button class="button-add" id="button-proposal"
onclick="javascript:window.location.replace('send-proposal?event_id=@events.event_id@&product_ids=@product_ids;noquote@ ');">
#evex-event.Send_proposal#</button>
<br><br>
<if events.admin_p>
...
}
}
...
Does that mean db_multirow's scope isn't aware of page variables?
How do I bring the page variables into listtemplate's scope?
[07/Aug/2018:23:02:38][2470.7f65ca7fc700][-conn:evex:3:3883-] Error: Error in include template "/var/www/evex/packages/evex-event/lib/events": can't read "product_ids": no such variable
called from adp_parse_ad_conn_file
called from rp_serve_concrete_file /var/www/evex/packages/evex-event/www/request-proposal.adp