21

Why use CSS overrides? It's always a good idea to keep your CSS styles separate from the existing template styling, if you're using a pre-built Joomla template. It's easier to maintain Your changes will not be lost if you upgrade the template You can easily copy/move the modifications to another template or another site. How does CSS overrides work? CSS ...


16

Yes it is possible. You can use a system plugin to override the classes, please read this link and this and this Two problems that you will face: you need to override the whole class (not just parts of it) if the core is updated and the class is also updated/changed, you need to update your override (if needed).


12

When Joomla core is updated, no overrides in your template folder should be affected. That's why they exist. On core Joomla items, overrides are going to only rarely conflict with Joomla core updates. When you override the Joomla core files, or any files, document document document. Commenting in the override file is CRITICAL if this is going to happen ...


12

If you use a custom template (or you write your own) you can easily remove the generator tag by putting the following code at the top of your template's index.php file. $this->setGenerator(null);


10

I created a plugin a while ago that allows you to override core classes, but it still falls prey to the problems that @jackJoe pointed out in his answer. However, it allows you to do the overrides cleanly. https://gist.github.com/dongilbert/3237387


9

You would want to match the path that you send as the first parameter within your template at templates/*your_template*/html/layouts/ So in the example you listed of <?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?> copy the file currently at layouts/joomla/content/intro_image.php to templates/*your_template*/html/...


9

Yes, the best way is to copy the desired template by Joomla admin. Go to Extensions > Template Manager > Templates and click on desired template. Then click on Copy Template and enter the new name. Then make it default and work on the index.php file. Side notes: The reason why your changes got overridden is because sicne the initial release of the ...


8

Custom.css for Joomla 3.4.1 and later This method is the easier for custom CSS overrides for the admin template. Simply create a custom.css file and place it inside the css folder of the ISIS template, like so: administrator/templates/isis/css/custom.css The template will load this css file last, so any css rules declared there, will override the core ...


8

You firstly need to ensure the developer has used the correct approach for importing the CSS file, using JHtml, like so: JHtml::_('stylesheet', 'mod_module/style.css', ['relative' => true]); The key to this, is the true argument. If this isn't defined or is false, then the override isn't possible. The true argument means the path is relative to the /...


7

Try this(tested and worked in Joomla 3.3.0): Put this code: <?php //introtext echo $item->text; //image $images = json_decode($item->core_images); echo '<img src="'.$images->image_intro.'">'; //get category name by id $db = JFactory::getDbo(); $id = $item->core_catid; $db->setQuery("SELECT cat.title FROM #__categories cat WHERE cat....


7

Joomla 3.5+ (Protostar template) As of Joomla 3.5, you're able to create file called user.css and place it in: templates/protostar/css/user.css Note: the file name must be user.css The protostar template will check if: The file exists The file size is > 0. If both conditions are met, it will automatically import this file for you. See the Pull ...


7

Ok. Solved it. The problem was I was putting the code/ folder in administrator/ root, instead I should have put it inside the template folder (administrator/templates/my_template/code/). Now it works.


6

The solution was to create a module override of \modules\mod_custom\tmpl\default.php The offending code in that file was <div class="custom<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')) : ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> > <?...


5

In the most current versions of Joomla (3.x), doesn't this setting in the Global Configuration do what you need, and hide the generator info:


5

The more standard approach would probably be to use a plugin to catch the JForm object after the XML has been processed but before it has left the model to make your changes. An example of that function would be like this: function onContentPrepareForm($form, $data) { if (!($form instanceof JForm)) { $this->_subject->setError('...


5

Option 1: Create a menu for your categories and articles. Everytime you add an article to your category, you also add it to your menu. Then you use the menu module to call in that information. It'll be a menu, but it'll look like categories and articles. Option 2: Create multiple modules, one for each category, and call them all into that space. They'll ...


5

If you would like to change the structure/styling for an Article view, you need to create a Template Override, all of which is explained here: http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core Template overrides allow us to edit the view of an extension without editing the core file which may get overridden in an update. So once you ...


5

Alternative layouts Docs says: As with module layouts, the file must not be named the same as the core file and must not include underscores in the name. Additionally, there should not be an XML file of the same name in this folder. So if there is XML file, it's considered to be alternative menu item, not alternative layout. You could create one extra ...


5

Assuming with fails you mean it simply doesn't show on the article page and not that you are getting any other kind of errors. The code you posted seems okay and should work. So, I guess it might be one of the following reasons: Module is not enabled; - The module must be enabled. Module is not assigned to the current menu item for that article. You ...


5

you also could use the standard 404 (or similar) php-file of your template if it already exists. The Joomla! alias standard would be /404 or /404.html according to the global configuration for the alias handling. Normally it´s no good idea to override this behaviour by hand. I would just use <?php echo JText::_('SOME_INFO_FOR_404'); ?> inside the ...


4

For Joomla 3 users - check these. It will help you. Override MVC classes in Joomla 3 Plugin - https://github.com/ghazal/plg_mvcoverride http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core Thanks https://joomla.stackexchange.com/users/270/ghazal


4

I was on this one for very long time and promised Don that once I am done will give more details about it . I needed to override Joomla MVC for components and tell Joomla to look for overrides in my plugin html folder also , not only inside template html folder. What I never liked is when developers actually take Joomla default class and mess with it , so ...


4

Once I have used a tiny plugin called ByeByeGenerator ( http://extensions.joomla.org/extensions/site-management/seo-a-metadata/generator-tag/12556 ), which removed the generator tag immediately! Give it a try!


4

Write a small script which calculates md5 of original-files which you have done over-riding. Dump these file-path and MD5 into a file in your template Whenever joomla is updated, run the above script again. Check the difference in MD5, if any then you need to check it out. Tip: Override the files only if those changes cannot be done by CSS overriding.


4

The intro image is generated in the JLayout layouts/joomla/content/intro_image.php. You can override this in your own template in /templates/your_template/html/layouts/joomla/content/intro_image.php. Just copy the file there and adjust as needed. I think you should be able to generate a link there. To generate the link, you can use JRoute::_(...


4

If the Helper Class is loaded in a dynamic way, checking if it's already loaded, YES. You can override it. Not with a HTML overrides, but with a System Plugin. You can create a System plugin, loading same Helper Class before the original one. Please, check this related question: How to override core classes?


4

Helix Framework (JoomShaper) Another Joomla template framework, that facilitates the customization workflow. Helix Framework templates provide as well an easy way to add your custom styles with 2 convenient methods. In the template control panel in backend, there is a Custom CSS field. Here you can type your css, which will be added as a style element in ...


4

Actually the language siwtcher module gets the flags images from the directory /media/mod_languages/images We can define which image should be used for each language, when creating/editing the Content Languages in Language Manager, through the Image Prefix selection. According to the instructions that appear when hovering the field: Prefix of the ...


4

You can do this most easily from a plugin actually. No core files are changed, so it should be completely update proof. You likely already have a plugin for the profile system that is adding the fields to the form. You may not want to edit that either, but it should be simple to copy the user plugin and set up the following function in that: function ...


4

Okay - here it is. This site uses outdated Joomla and outdated T3v3 framework. T3v3 holds its overrides inside the T3 system plugin. I had long time to use a T3 template and I didn't see this right away. Full path: plugins/system/jat3v3/t3v3base/html/ But, even this way, I would expect that any custom override inside the template should take ...


Only top voted, non community-wiki answers of a minimum length are eligible