Whatever it is your reason, sometimes you need to change things on how the components output your information in Joomla. The easiest way is doing a hack into the code, however easy is not always the correct way. Hacking the code (doing changes to the PHP files) is not upgrade safe, the next time Joomla publishes an update, your changes are gone for good.
You could do this with a template override as well, but modification would be tied to the template. Since the template I am not using doesn't override the com_content component, I did the call to do it this way.
The first step is finding the component view you want to alter. In my case, I want to modify the way the article links are done. In this case, things are in the components/com_content/views/article/tmpl directory. You will find at least two files: default.php and default.xml. I have also found the default_links.php file. As my readings, files with an underscore are templates of the views. In my very specific need, what I needed to modify was in defaullt_lniks.php file, but to make this the right way, we need to clone the layout, later we will modify it. Do the following:
After that, do the modifications in the new files as you wish.
At this point, your modification is ready but it is not applied. Do the following:
Good luck!blog comments powered by Disqus