It would be the use of components in plugin_wiki/page pages `` name: oppty_contacts .... ``:widget
in this case you do not need to worry about response.fields.append() because the plugin is rendered before it is embedded in view. On Aug 13, 10:01 am, Miguel Lopes <[email protected]> wrote: > Yes your explanation makes perfect sense, and that solves my encapsulation > problem. Thank you. > You mention normal web2py controllers and views, what would the other kind > be? > > Miguel > > On Fri, Aug 13, 2010 at 1:19 PM, mdipierro <[email protected]> wrote: > > > 2) You can include a js in a component > > > def oppty_contacts(): > > response.files.append(....) > > ... > > > and you have not problems with markmin pages. > > > BUT you will no be able to do > > > {{=plugin_wiki.widget('oppty_contacts',...)}} > > > because the response.files.append will be executed after the header is > > serialized anyway, if you are using the {{....}} syntax that you are > > probably using normal web2py controllers actions and views. In this > > case you can do > > > in function: > > > mycomponent=plugin_wiki.widget('oppty_contacts',...) > > > in view: > > > {{=mycomponent}} > > > Hope this makes sense.

