Forum .LRN Q&A: Re: Add a portlet?

Collapse
6: Re: Add a portlet? (response to 1)
Posted by xx xx on
I don't see a UI that will let you add new portlets to templates, so you will have to do that manually or at creation of the package. You say the package works in one portlet so I presume your applet/portlet servicecontracts should work well.
Try adding them to the templates like this:

set your_applet "..(fill).."
set package_id [apm_package_id_from_key $your_applet]
set template_ids [db_list template_ids {select portal_id from portals where template_id is null}]
foreach template_id $template_ids {
    set args [ns_set create]
        ns_set put $args package_id $package_id
        user_location::add_portlet_helper $template_id $args
}

If you see the portlet in "customize portal layout" but they don't show than there is probably a problem with retrieving the content.
(new-portal/www/render_styles/individual/render-element)