Template Customizations
The following customizations are made to main_template:
- portlet headings and page titles have same colour as currently selected navbar tab
- enabling different customizations for .my and .www sites
Other global templates that are customized include:
- global_sections: providing up to 7 new global navbar tabs
- global_pathbar: changing the breadcrumbs slightly
Also, vsCore enables the following possible page template customization:
- call vsRandom: add random document or image to page.
These customisations are explained below:
main_template customisations:
main_template body div:
Ensures that portlet headings and page titles will have the same colour as the currently selected global navbar tab. Everything underneath the body tag is enclosed by a div tag having an id corresponding to the selected tab; for example id="vs-scheme1" or id="vs-scheme2" etc.
If no global navbar tab is selected, the id will be "vs-scheme1".
This requires CSS corresponding to the id 'vs-scheme1 - 7' to be inserted into your Plone skin.
main_template add-in: body_end_code_www/body_end_code_my:
Sometimes users might need to insert different customizations for sites with different prefixes e.g www and my: one example of use might be so that stats software can differentiate between anonymous and authenticated users.
VsCore assumes www and my are the two prefixes used, although the code can be very easily modified for other prefixes.
vsCore creates separate page templates body_end_code_www and body_end_code_my which allow users to insert code directly before the body-end-tag of the main_template. To use this feature, go to portal_skins/vsCore, click on body_end_code_www or body_end_code_my as required, and then on Customize.
Now customize the templates as required.
Note:
the vsAnonCheck call in v1.1 has been removed.
Other global template customizations:
global_sections
vsCore allows for up to seven top navbar tabs. The global navbar tabs are list items with classes c-1, c-2, ..., c-7, etc.
global_pathbar
Breadcrumbs customization: Doesn't show "you are here" anymore; and doesn't show the portal itself. The breadcrumbs start with public_home – so this folder should be given a meaningful title!
Adding vsRandom to page template:
vsRandom(ATDocument) renders a randomly selected document from the current "documents" folder. It is mainly used for portlet_vsrandomdocument, but can also be called from a page template, using
<span tal:replace="structure python:here.vsRandom('ATDocument')" />
vsRandom(ATImage) renders a randomly selected Image from the current "pictures" folder. It is mainly used for portlet_vsrandomimage, but can also be called from a page template, using
<span tal:replace="structure python:here.vsRandom('ATImage')" />
