JV-LinkDirectory - Creating and Editing Template Overrides

Sometimes, you may feel the need to change the default output from JV-LinkDirectory. But editing the original files will not survive upgrades and updates. Hence JV-LinkDirectory provides the feature of overrides to layout template files to help you achieve this. This is similar to the Joomla template overrides feature. 

Here is an illustration to explain what a override is, how to create override and edit the overridden file. It uses a simple use case of removing 'Link Published date' from category pages. We assume that the listing block design is set to "Modern" in configuration:

  1. Go to JV-LD Backend - Layout manager. For more info on this, please refer to https://kb.jv-extensions.com/article/307-jv-linkdirectory---what-is-layout-manager
  2. In the "Create Override" section, please select "tmpl_link_meta_modern.php" and click on "Create Override" button. When you do this, a copy of the tmpl_link_meta_modern.php file will be created in overrides folder in JV-LD.
  3. Now select "tmpl_link_meta_modern.php" from the "Edit Override" section, and click on "Load File" button. When you do this, the copy of the file that was created in the previous step will be loaded in an editor and will be presented to you, which you can modify.
  4. In the editor, you may make all desired changes. In this case, we will do the following:

    search for:

    <span><i class="fa fa-calendar"></i><?php echo JvldDate::getDateForDisplay($this->linkobj->getInfo('link_published_on')); ?></span>

    and remove that line
  5. Click on "Save" to save the changes to the override file.
  6. Now clear the browser cache and reload the frontend category pages to see the change.

Still need help? Contact Support Contact Support