Adjust the component's layout and style using template overrides

Though RSFiles! comes with a well organized display, there may be times when you would like to improve / adjust the look and feel of a certain area. In order to do this you will need to perform template overrides.

Template overrides offer tremendous flexibility in terms of content look and feel. Basically you can control any aspect - HTML output and CSS, without affecting the component's update process (changes to the source code will be lost if an update is made). As a drawback, this method requires a basic understanding of PHP, HTML and CSS.

This technique consists in duplicating the component's view files into the template's HTML folder. If you are new to Joomla! development, then it is probably easiest to start with an existing view, and try modifying it to achieve the desired result. To do this, you should make a copy of the existing view in the html directory of your template, and then modify the copy.

The following list explains what file controls what view:
  • the agreement page - components/com_rsfiles/views/rsfiles/tmpl/agreement.php
  • the bookmarks page - components/com_rsfiles/views/rsfiles/tmpl/bookmarks.php
  • the briefcase page - components/com_rsfiles/views/rsfiles/tmpl/briefcase.php
  • the briefcase navigation bar - components/com_rsfiles/views/rsfiles/tmpl/briefcase_navbar.php
  • the create folder page - components/com_rsfiles/views/rsfiles/tmpl/create.php
  • the general files listing page - components/com_rsfiles/views/rsfiles/tmpl/default.php
  • the general navigation bar - components/com_rsfiles/views/rsfiles/tmpl/default_navbar.php
  • the download page - components/com_rsfiles/views/rsfiles/tmpl/download.php
  • the download navigation bar - components/com_rsfiles/views/rsfiles/tmpl/download_navbar.php
  • the edit page - components/com_rsfiles/views/rsfiles/tmpl/edit.php
  • the edit icon - components/com_rsfiles/views/rsfiles/tmpl/edit_icon.php
  • the email download page - components/com_rsfiles/views/rsfiles/tmpl/email.php
  • the license page - components/com_rsfiles/views/rsfiles/tmpl/license.php
  • the preview page - components/com_rsfiles/views/rsfiles/tmpl/preview.php
  • the report file page - components/com_rsfiles/views/rsfiles/tmpl/report.php
  • the search file page - components/com_rsfiles/views/rsfiles/tmpl/search.php
  • the files listing by tag page by tags - components/com_rsfiles/views/rsfiles/tmpl/tags.php
  • the navigation bar for files listing by tag - components/com_rsfiles/views/rsfiles/tmpl/tags_navbar.php
  • the upload page - components/com_rsfiles/views/rsfiles/tmpl/upload.php
Folder Structure
  • Copy the default.php from PATH_TO_JOOMLA/components/com_rsfiles/views/rsfiles/tmpl/default.php
  • Create the following folder PATH_TO_JOOMLA/templates/TEMPLATE_NAME/html/com_rsfiles/rsfiles/
  • Paste the default.php in the newly created folder

Example: as an example, if you would like to remove the "File version" column from the general file listing page, simply comment or remove the following pieces of code:

      <th width="7%"><?php echo JText::_('RSFL_TPL_FILE_VERSION'); ?></th>
      <td><?php if ($file->type != 'folder') echo $file->fileversion; ?></td>
Template override for RSFiles! Modules

This method can be applied to modules, by matching the folder structure from below:

  • Copy default.php from PATH_TO_JOOMLA/modules/mod_rsfiles_folder_content_viewer/tmpl or PATH_TO_JOOMLA/modules/mod_rsfiles_latest/
  • Paste default.php to PATH_TO_JOOMLA/templates/TEMPLATE_NAME/html/mod_rsfiles_folder_content_viewer/ or PATH_TO_JOOMLA/templates/TEMPLATE_NAME/html/mod_rsfiles_latest/

Example: if you wish to change the icon from the Latest Files Module, you will have to add your new image to the assets folder and edit line 16 from the newly copied default.php.

      <img src="<?php echo JURI::root();?>modules/mod_rsfiles_latest/assets/file.png" alt="<?php echo $item->name; ?>" />
      //in this line you can change the path from the icon associated with the uploaded file

The way files and folders are being displayed using the System Plugin is being controlled by the following file:


17 persons found this article helpful.

Was this article helpful?

Yes No
Sorry about that