Login

New to DJ-Extensions?

How to change CSS or layout files

The best thing you can do considering changes in DJ-Catalog2 CSS code is to create your own theme.

To do so:

  1. Create a new folder in /components/com_djcatalog2/themes/my_theme
  2. 'themes' folder already contains the standard ('default') theme - DO NOT remove OR modify it.
  3. Copy CSS and image folders from the 'default' folder into your new theme folder. The theme folder should represent the following structure:
/components/com_djcatalog2/themes/my_theme
|-- CSS
|--- theme.css
|- images
|--- {all images from /default/images/ directory}
|- email
|--- { all .php files - each is individual for different type of e-mail notification, such as order confirmation, order notification, etc. }
  1. DO NOT copy the theme.php file nor the js folder into your theme unless you know what you are doing and plan to modify the theme's PHP or JavaScript code. The same applies to the email directory and files unless you wish to modify templates of email notifications from the Query Cart.
  2. Navigate to Joomla! Back-end, DJ-Catalog2 options, and in General Configuration tab, change current theme to 'my_theme.'
  3. From now, DJ-Catalog2 uses 'my_theme' instead of the default one. Any modifications that you wish to make, you should perform within your new theme - the changes will not be overridden when you decide to update the component.
    Sometimes changing just the CSS code maybe not enough for you, and you feel like making modifications in DJ-Catalog2 layouts. There two ways to do this.
The first, standard approach is to override layouts within your Joomla! template, which involves copying component's layout files:

/components/com_djcatalog2/views/{view_name}/tmpl/{layout_name}.php

into:

/templates/{your_template}/HTML/com_djcatalog2/{view_name}/{layout_name}.php

The second way is very similar to the first one, although instead of copying files into the template's HTML folder, you should copy them into the following directory:

/components/com_djcatalog2/themes/my_theme/views/{view_name}/

For example, to override the general layout of Single Product View, you should copy the following file:

/components/com_djcatalog2/views/item/tmpl/default.php

to:

/components/com_djcatalog2/themes/my_theme/views/item/default.php

NOTICE: Copy only those files that want to override (change) - it will save you a lot of time if the future update of the component brings lots of changes in layout files.

© 2023 DJ-Extensions.com. All rights reserved.