Forum OpenACS Development: Re: Getting package_id in an init.tcl script

Collapse
Posted by Randy O'Meara on
Once a package is mounted it's always mounted.

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:
    site_node::get_children
    site_node::get_from_node_id
    site_node::instantiate_and_mount