amberbam — 2012-01-26T15:17:39-05:00 — #1
I am creating a website with Joomla and so when I download modules all I do is install them and the code places itself. However, I like to customize things and am just wondering how i can tell which page to go to to change code. I have firebug to inspect the elements on the page and it shows the html and css, for the css it tells me exactly what file the CSS is contained in. for example: template.css [insert css here] but for the html that it shows it doesn't seem to indicate where it is coming from. I can inspect the element and see exaclty what I want to change, but i don't know how to get there aside from checking every .php file on the site. Thanks.
mat30 — 2012-01-26T17:48:51-05:00 — #2
Of course it wouldn't, because it can only report the HTML that is served by that particular page: i.e. what the browser gets. Use your text/code editor or IDE to do a "find in files" search for any strings that will clearly identify the source, but don't expect guaranteed results because by no means all HTML is in plain text in the middle of complex PHP files: far from it in many cases.
EDIT: Check Joomla's modules for any that assist development, like the Devel module for Drupal.
fizixrichard — 2012-01-27T11:34:26-05:00 — #3
Unfortunately what Mat30 has suggested is your only option, a nasty nuance of the cms not having a real template engine I'm afraid.
If the code is being generated by the plugin you might be able to narrow down your script search to that plugins files, might be worth going through them first (check the plugins folder first) as it could lead you to where you want to go. But be careful as you could easily both things up.
amberbam — 2012-01-27T16:06:44-05:00 — #4
Thanks. I can't seem to find the specific line of code I'm looking for in any of the modules files. Oh well, guess I'll try something else!
cms_dude — 2012-01-30T12:12:57-05:00 — #5
If the HTML is being produced by a module or plugin, then you only need to search the files for that particular module or plugin.
If the HTML is coming from the article, then you can just go to that article, and switch the editor (TinyMC or whatever you're using) to HTML mode.
And if the HTML is coming from your template, then just go to the index.php file for that template.
In most cases, it's not much more complicated than that.