Difference between revisions of "Website Joomla Core Customisations"

From CCCWiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
The following Joomla! core files have been customised because there was no template override. The customisations need to be replied after every upgrade:
+
= Upgrades =
#<code>[joomla-root]/libraries/cms/helper/tags.php</code>: Copy <code>tags.org-v3.4.8.php</code> over <code>tags.php</code> so that is replaces the content. This will ensure that additional columns for DPCalendar events are returned by the database query so that they can be displayed in any views that list thumbnails of articles with specific tags.
+
The following Joomla! core files have been customised because there was no template override. These customisations need to be replied after every upgrade:  
 +
* <code>[joomla-root]/libraries/cms/helper/tags.php</code>: Copy <code>tags.org-v3.4.8.php</code> over <code>tags.php</code> so that it replaces the content. This will ensure that additional columns for DPCalendar events are returned by the database query so that they can be displayed in any views that list thumbnails of articles with specific tags.
 +
* <code>[joomla-root]/components/com_tags/models/tag.php</code>: Copy <code>tag.org-v3.5.1.php</code> over <code>tag.php</code> so it replaces the content. This will ensure that result set of tagged items on the homepage and other tag list will be limited by the number specified in the settings.
 +
* <code>[joomla-root]/components/com_tags/views/tag/tmpl/default.xml</code>: Copy <code>default-v3.6.5.xml</code> over <code>default.xml</code> so it replaces the content. This will ensure that it is possible to set the maximum number of tagged items, e.g. on the home page.
 +
 
 +
= Homepage =
 +
 
 +
The homepage has been heavily customised to meet our specific requirements. The basis for the homepage content is the ''Tagged Items'' menu type.
 +
 
 +
The menu type shows a list of content items thumbnails that have the following tags:
 +
* ''All news and media/All news''
 +
* ''All news and media/All noticesheets''
 +
* ''All news and media/All newsletters''
 +
* ''All news and media/All audio recordings''
 +
* ''Featured''
 +
 
 +
The list is ordered by the creation date of the content in descending order. DPCalendar events whose end date has passed are automatically excluded to make sure that the homepage never shows outdated events.
 +
 
 +
In order to reduce the effort for the content author and to ensure consistency, the default view component has been customised as follows:
 +
* For DPCalendar events, the start date/time is generated automatically. Note that for all day events, no time is shown.
 +
* For DPCalendar events, everything that follows the introduction separator is hidden (which is the default behaviour for most Joomla content types but not for DPCalendar events)
 +
* For DPCalendar events and news/media content, a label is generated that indicates the category of the content.
 +
 
 +
The view overrides are stored in <code>[joomla-root]/templates/uber/local/html/com_dpcalendar/event/*.php</code>. As mentioned in the ''Upgrades'' section above, the <code>[joomla-root]/libraries/cms/helper/tags.php</code> had to be modified to extract the start date, end date and all-day-event indicator for DPCalendar events and to exclude historic events. Since Joomla has no override mechanism for library files, these customisations have to be reapplied manually after every upgrade.

Latest revision as of 12:48, 3 March 2018

Upgrades

The following Joomla! core files have been customised because there was no template override. These customisations need to be replied after every upgrade:

  • [joomla-root]/libraries/cms/helper/tags.php: Copy tags.org-v3.4.8.php over tags.php so that it replaces the content. This will ensure that additional columns for DPCalendar events are returned by the database query so that they can be displayed in any views that list thumbnails of articles with specific tags.
  • [joomla-root]/components/com_tags/models/tag.php: Copy tag.org-v3.5.1.php over tag.php so it replaces the content. This will ensure that result set of tagged items on the homepage and other tag list will be limited by the number specified in the settings.
  • [joomla-root]/components/com_tags/views/tag/tmpl/default.xml: Copy default-v3.6.5.xml over default.xml so it replaces the content. This will ensure that it is possible to set the maximum number of tagged items, e.g. on the home page.

Homepage

The homepage has been heavily customised to meet our specific requirements. The basis for the homepage content is the Tagged Items menu type.

The menu type shows a list of content items thumbnails that have the following tags:

  • All news and media/All news
  • All news and media/All noticesheets
  • All news and media/All newsletters
  • All news and media/All audio recordings
  • Featured

The list is ordered by the creation date of the content in descending order. DPCalendar events whose end date has passed are automatically excluded to make sure that the homepage never shows outdated events.

In order to reduce the effort for the content author and to ensure consistency, the default view component has been customised as follows:

  • For DPCalendar events, the start date/time is generated automatically. Note that for all day events, no time is shown.
  • For DPCalendar events, everything that follows the introduction separator is hidden (which is the default behaviour for most Joomla content types but not for DPCalendar events)
  • For DPCalendar events and news/media content, a label is generated that indicates the category of the content.

The view overrides are stored in [joomla-root]/templates/uber/local/html/com_dpcalendar/event/*.php. As mentioned in the Upgrades section above, the [joomla-root]/libraries/cms/helper/tags.php had to be modified to extract the start date, end date and all-day-event indicator for DPCalendar events and to exclude historic events. Since Joomla has no override mechanism for library files, these customisations have to be reapplied manually after every upgrade.