Forum OpenACS Development: Re: Getting package_id in an init.tcl script
The after_mount callback does work if I mount a new instance of bulk-mail from the site-map. But it does not happen when the site starts/restarts. There must be some other mechanism other than site_node::mount mounting up the packages during site startup. Can anyone point me in the right direction?
As Don said, if you're trying to retrofit existing bulk-mail instances with attachments, an *-init.tcl file that searches the site-map for existing bulk-mail (without attachments child node) and instantiates attachments would work. You should only have to do this once to hit every existing bulk-mail node.
If you add code to the bulk-mail after-mount callback to instantiate attachments, each new (mounted) bulk-mail instance would automatically get attachments.
Procs that may be useful: