Moving, Deleting and Changing Text of Document Bylines
From 2.1 onwards, the bylines are at the top of the page...
In Plone 2.1 onwards the byline is added by default at the top of the page. It will say something like:
By: webmaster last modified 11/12/1005 History +
This can be useful for some sites, but also can be inappropriate. For example, putting a poem by Shakespeare could leave you with this:
To Be or Not To Be from Hamlet
By: Richard last modified 1/01/2006
"To be or not to be, that is the question:
Whether 'tis nobler in the mind to suffer..."
Rather inappropriate, perhaps, although Richard is quite a good writer.... :)
Here are a couple of suggestions:
To Make Document Byline Invisible
- The rash, dont-look-it-up-way: Instead of moving the <div> in the above line of code and it's content, I just place html comments around it to make it invisible, i.e. <!--<div></div>-->
- The easy way: in theZMI, click on portal_properties, then site_properties and uncheck the AllowAnonymousViewAbout box.
Moving Document Byline
- In the ZMI, in portal_skins/plone_content/document_view/, first move the document_view page template into the portal_skins/custom folder/ (a copy placed in the custom folder always overrides the original—in this case in plone_content). This can be done in the usual way by clicking "Customize".
-
Then move the following line which calls the byline:
<div metal:use-macro="here/document_byline/macros/byline">
Get the byline - contains details about author and modification date.
</div>
to almost the bottom of the document_view template, leaving it just above related_items.
Strangely enough, putting in align="right" into the div tag above doesn't seem to align the byline to the right; one has to customize portal_skins/plone_content/document_byline/ instead, adding align="right" to the <div class="documentByLine" > tag.
Note: For best practice, "Customize" is only used for quick fixes or to show how the final customization will work. Long-term, your template changes should be included in a product that can be placed in the Zope products folder and the files in the custom folder deleted.
Changing text of Document Byline
in the ZMI, go to portal_skins/plone_content/document_byline/ and click "Customize" as before.
The bits to change are fairly obvious - i.e to change the "By Richard Pettinger" to "Page created by Richard Pettinger" (and remove any lingering doubts as to the authorship of Hamlet), change
<span i18n:translate="label_by_author">
By
to
<span i18n:translate="label_by_author">
Page created by
Also, you can remove the modification date and the history by commenting out the appropriate section; i.e to remove the last modified date, comment out the paragraph beginning with <span i18n:translate="box_last_modified">
