RT 4.4.0 Documentation
Writing portlets
Introduction
A "portlet" is a component used to extend your RT instance, specifically the "RT-at-a-glance" home and Self-Service pages. For instance, the "n Highest Priority Tickets I own", "Quick Ticket Creation" and "Queue List" panels on the default homepage are portlets.
Creating the Portlet
There are at least two things you have to do to create a portlet:
- Create the template
-
Create a Mason template in
/opt/rt4/local/html/Elements
that defines your portlet's behaviour. - Set
$HomepageComponents
config -
Enable your portlet by adding its name to the
$HomepageComponents
configuration variable in RT_SiteConfig.pm.
Once you have created and installed your portlet, you will need to restart the webserver.
Customizing home page
When you click on the "Edit" link at your home page (or go there via your preferences), you can select which of the available portlets are displayed in the "body" (left) or "summary" (right) columns of the home page.
Customizing Self-Service page
They can also appear on the Self-Service interface, but have to be hard-coded, because Self-Service users don't have the same preferences available to them. You will have to create your element in /opt/rt4/local/html/SelfService/Elements
, then exend the SelfService interface to call it. Copy /opt/rt4/html/SelfService/index.html
to /opt/rt4/local/html/SelfService/index.html
, then edit it to add:
<& /SelfService/Elements/MyPortlet &>
← Back to index