Add OpenX advertising banners in a portlet
You can ad OpenX Ad Zones as Portlets by putting the javascript code into a TAL Portlet.
Requirements
- Plone 3.x
- TAL Portlet
Once you have TAL Portlet installed
- Go to the relevant section of the site, click Manage Portlets.
- Add a "TAL Portlet" (you can't use a Static Text portlet because the Ad Zone javascript will get filtered by Plone as unsafe).
- The TAL Portlet will have default code as follows:
<dl class="portlet portlet${portlet_type_name}" tal:define="portal_state context/@@plone_portal_state; context_state context/@@plone_context_state;"> <dt class="portletHeader"> <span class="portletTopLeft"></span> <span> Header </span> <span class="portletTopRight"></span> </dt> <dd class="portletItem odd"> Body text </dd> <dd class="portletFooter"> <span class="portletBotomLeft"></span> <span> Footer </span> <span class="portletBottomRight"></span> </dd> </dl> - Paste the javascript code in where it says "Body text" above. If you don't want the portlet to have a header or footer, remove the <dd class="portletHeader"> and/or <dd class="portletFooter"> blocks as appropriate. To change the portlet title, replace the text "Header."
- Save the portlet. Reposition as needed.
