JV-LD 5.4 Dev Update – Style Template Files Overrides

imgdoc 94

imgdoc 94

We are back now with one more post on JV-LinkDirectory 5.4 to share an important change/feature that we are introducing in Styles section in JV-LinkDirectory back-end. In JV-LinkDirectory 5.4 we are introducing the “Style Overrides”.

In JV-LinkDirectory 5.3 and earlier versions, one could edit the style php and css files in the Styles section. Except for custom.css all these changes were lost when you did an upgrade. This meant that after every upgrade you reintroduced all the changes. The pain point here was to keep track of the list of those files that you had changed, and the changes and reapply them after an upgrade.

Style Files Overrides:

In JV-LinkDirectory 5.4, we are introducing the concept of overrides to styles. This is similar to the Joomla template overrides feature. In the styles section, you will no longer be able to edit the style/template files that are originally installed by JV-LinkDirectory. Instead, we provide you with 3 options:

Create an Override:

This option lets you select a file from the original list of files of the selected style, and make a copy of it in an overrides folder. The overrides folder is set to {Joomla}/media/com_jvld/overrides/{stylename} for the selected style. JV-LinkDirectory will create this folder automatically when you create the first override.

Once the copy is made, it will be loaded automatically on the screen and shown to you for making edits. You can make the modifications to the template file and then save the changes. This ensures that you are always editing the files in override folder and not the original ones. These overridden files retain the changes during upgrades.

Edit an Override:

This options lets you select a file from the list of files in the overrides folder, and load them on the screen for editing. Please note that, you need to create an override first, before you can edit that file. At any point in time, the overrides folder for a style will only contain those files that have been overridden and not all the files. This means that you don’t need to keep track of modified files anymore. You only need to reapply the changes to those files after an upgrade.

imgdoc 95

And to make it easy, we will also show you the original file for comparison below the overridden file in Edit Override screen. This should help you apply or reapply the edits to your overridden files faster.

Delete an Override:

If at any point you decide that an override is not required anymore, you can use this option to delete the file in the overrides folder. Once deleted, this will not be available in the “Edit Override” option.

Front-end Loading Order:

While loading the front-end screens, JV-LinkDirectory will look for an overridden file in the overrides folder. If not available, then it will look for it in the media/com_jvld/styles/{stylename} folder.

With this feature, we expect the hassle to create and make overrides much simpler. Administrators can quickly apply changes to styles and customize the style files easily and faster.

Hope you like this new feature…