Personal tools
You are here: Home Products SmartPortlets Documentation How-Tos How to customize a SmartPortlet portlet
Document Actions

How to customize a SmartPortlet portlet

This How-to applies to: Any version.

Tips on modifying the portlet displayed by SmartPortlets

Structural Changes

If you want one of your SmartPortlets to be structured differently from the others:

  • Go to portal_skins/SmartPortlets in the ZMI
  • Click on the "smartportlet" template.
  • Click the "Customize" button on the template page.
  • Before you make any changes, rename the template (ie, give it a new id, like "my_smartportlettemplate". If you want your changes to apply globally to all SmartPortlets, there's no need to rename the template.
  • Make whatever changes you need, then save the template.
  • Plug your custom SmartPortlet into left_slots or right_slots with an expression like here/smartportlets_tool/my_smartportlet/my_smartportlettemplate.

Style Changes

Each SmartPortlet portlet is wrapped in a DL tag that has an ID attribute based on the ID of the SmartPortlet object from which it is derived. For example, if you have a SmartPortlet object with an ID of "foo", then the DL wrapping the generated portlet will have an ID attribute of "smartportlet-foo".

You can use that ID attribute as a CSS selector to style that DL and everything contained within it. For example, if for some reason you wanted the portlet title to have a red background:

    dl#smartportlet-foo dt.portletHeader {
        background-color: #F00;
    }

That's it!

by Sean Fulmer last modified August 4, 2006 - 00:40

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by