I am trying to change the text displayed in the "Recent Changes" portlet to read "Most Recent."
I have found recent.pt in portal_view_customizations but the template has a variable instead of clear text where the heading goes:
I tried editing the variable but it returned an error. I edited the word "Title" but that didn't change anything.
How do I accomplish this?
Thank you Espen.
Ideally, what I would like to do is find where the words "Recent Changes" exist that the portlet template is calling them from, and change those words to read "Most Recent." Is that possible to accomplish?
Thank you again, Espen.
Override the box_recent_changes id in your own translation file for plone namespace.
In the Recent Portelt is the key defined. In the plone.app.locales is the key with a empty value. The default from the script is taken. If you want to know how override the value look here
Another advantage of using the translation mechanism to change text is that it does not require customization of viewlets via portal_view_customizations, which can have bad side effects (ie. permission problems caused by customized views invoking Python methods that break because they're now being called using Restricted Python)
However, since you need to modify the translation file on the file system and that clients be restarted, it requires a level of access that not all website administrators may have... or is there a way to do it 'live' on a site with just the web browser?
Thanks for the pointers. I will probably just edit the tal content line and let that live that way for a while. It is at proof-of-concept and minimal viable product stage now so that is all that is required. Thank you again.
Personally, whenever the need comes up to customize a portlet, I try to find an alternative solution using the web-UI-possibilities, it's less of a hustle.
Here you could create a collection, showing all items sorted by modification-date, and then add a collection-portlet. That allows you to enter an arbitrary portlet-header-title via the UI.
For multilingual sections, add a portlet for each language. While this doesn't use a translation-machinery, it can also be an advantage to be able to change titles as wished by site-users. That depends on your specific requirements.
You can make this reproducible within an add-on, by creating the collection on a reinstall/upgradestep and assigning the portlet via a GenericSetup's profile (export portlets.xml of the site and include it in a profile).