Forum OpenACS Q&A: Re: globalizing ecommerce toolbar, howto know if "in" package instance?

Here is an example failed attempt:

at end of default-master.tcl:

# In ecommerce package?
set ec_pkg_id [ec_id]
set is_in_ecommerce_p [expr $pkg_id == $ec_pkg_id]

in default-master.adp (for diagnostics):


<p>@is_in_ecommerce_p@, pkg_id:@pkg_id@ ec_pkg_id:@ec_pkg_id@</p>

results are same regardless of page requested from within bugtracker, API Browser etc:

 0, pkg_id:272 ec_pkg_id:511

Granted ec_id is object_id, not package_id. I figure there is a way to create an ec_pkg_id proc, maybe requiring a call to the db?

Also, isn't pkg_id (in default-master.tcl) supposed to change value depending on page requested?

hints etc much appreciated.