Custom Theme JS

Is it ok to edit /com_djcatalog2/themes/custom/js/theme.js ?
I am trying to make most of the fields read only for front end edit. For example I do not want the user changing the category.
Thanks

Comments

  • Hi,

    If it's necessary, that is you cannot avoid it (by creating your own script in the template), then it's OK to edit theme.js file in your custom theme. The problem is that if you do create theme.js file in your theme (assuming it's not created already) then you will need to observe future updates in this file and apply them manually.
  • I got round it using the sorcerer module. Thanks
  • Can I use template override for theme.js. I tried it and override doesnt seem to apply?

    /var/www/vhosts/abc.com/httpdocs/templates/jm-fitness/html/com_djcatalog2/themes/custom/js/theme.js
  • Hi,

    yes you can, but you need to make override in DJ-Catalog2 theme - not Joomla! template. So the file should be placed in following location:

    /var/www/vhosts/abc.com/httpdocs/components/com_djcatalog2/themes/custom/js/theme.js

    And of course "custom" theme should be selected as your theme in DJ-Catalog2 global configuration.
    https://dj-extensions.com/faq/dj-catalog2-faq/how-to-change-css-or-layout-files
Sign In or Register to comment.