Forum OpenACS Development: template::adp_include seeming to not pass varlist

Any idea why template::adp_include for this below referenced page does not pass the product_id? The page that invokes this code snippet returns a page that states:

We had a problem with your input:
* You must supply a value for product_id
and does not execute any code after this same line:

set page [template::adp_include "/packages/ecommerce/www/product" [list product_id $product_id usca_p $tvalue ]]

I've tried removing the :integer validation and a few other cases, and nothing stands out to me in the template::adp_include code to suggest this would not work (like it works for other pages).

Collapse
Posted by Dave Bauer on
Hard to say, looks like it is looking for a form/url variable.
If you are trying to include a page that calls ad_page_contract you need to

1) split the original page into two parts, one with ad_page_contract, and the includable parts

or

2) set the form variable with rp_form_put.

Collapse
Posted by Torben Brosten on
Thank you, Dave.

Option 2 didn't work on previous attempts, it complained with duplicate input.

I'll go with Option 1. Most of the ecommerce package pages (and some of the ec_* procedures) should be upgraded to use /lib templating anyway.

cheers, and Happy Thanksgiving!

Torben