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.

 
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:

/components/com_rsfiles/views/rsfiles/tmpl/plugin.php


9 persons found this article helpful.


Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Settings

Setting up Briefcase Folders

RSFiles! Menu Items