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?
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).
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 ...
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.
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/...
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.
The reason why your changes got overridden is because sicne the initial release of the ...
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:
The template will load this css file last, so any css rules declared there, will override the core ...
Try this(tested and worked in Joomla 3.3.0):
Put this code:
$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....
Joomla 3.5+ (Protostar template)
As of Joomla 3.5, you're able to create file called user.css and place it in:
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 ...
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 /...
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;?> >
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))
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 ...
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:
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 ...
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 ...
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 ...
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 ...
For Joomla 3 users - check these. It will help you.
Override MVC classes in Joomla 3
Plugin - https://github.com/ghazal/plg_mvcoverride
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 ...
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!
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.
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::_(...
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?
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 ...
Actually the language siwtcher module gets the flags images from the directory
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 ...
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:
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.
But, even this way, I would expect that any custom override inside the template should take ...