Re: How can I include custom javascript file on dexterity content type
espen <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <[email protected]> |
16. des. 2014 kl. 19:44 skrev Bruno Barbosa [via Plone] <ml-node+s293351n7573044h17-PKuAHvtXa09l57MIdRCFDg@public.gmane.org>:
> Hi!
>
> I need include a custom javascript file on add and edit views in my custom content type in dexterity like a helper_js on archetypes.
>
> How I can do?
one option would be to register a viewlet for that content type, and load it from there.
http://docs.plone.org/develop/plone/views/viewlets.html#id4
If you «manually» make the views, you could just include it there (probably with a fill slot)
maybe like this:
<metal:js fill-slot="javascript_head_slot">
<script type="text/javascript» >
your script or a link to it
</script>
</metal:js>
you could put a condition in portal_javascript (might be difficult)
… or you could do it in a diazo rule
Espen
> att,
> --
> Bruno Barbosa
> [hidden email]
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Plone-Users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-users
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://plone.293351.n2.nabble.com/How-can-I-include-custom-javascript-file-on-dexterity-content-type-tp7573044.html
> To start a new topic under General Questions, email ml-node+s293351n293352h65-PKuAHvtXa09l57MIdRCFDg@public.gmane.org
> To unsubscribe from Plone, click here.
> NAML
--
View this message in context: http://plone.293351.n2.nabble.com/How-can-I-include-custom-javascript-file-on-dexterity-content-type-tp7573044p7573045.html
Sent from the General Questions mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users