Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
tjohns92109 wrote: I don't get this. I've searched everywhere and all I can find is how to create a new template inside the plugin/templates folder. Except for a lot of people complaining about the same thing.
So let's say I want to change the <h3> in the profile title to an <h1>. That's located inside the file, \components\com_comprofiler\plugin\user\plug_cbcore\cb.core.php. So how does creating a new template inside the templates folder do any good for something like that?
Then, let's say I want to alter the user list template... which I need to do. If I, for example, add a class to one of the divs inside the new default.php file in the new template, CB still uses the code from the default.php file inside the default template. And you can't unpublish that template/plugin in CB.
So I just don't see a way to customize the code in CB like you can using overrides with other components.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Most of the files will auto inherit. For example you can override bootstrap.css and let the other files inherit from default. It's up to you.Okay... so it seems that creating a new template only gives you a way to edit css via overrides.css.
No. Do not use important tags. They are only used as an absolute last result. For example CB has a few due to Joomla having aggressive ID based styling instead of using classes or elements. ID styles begin with 1000 selector weight so you need dozens of selectors or important tag to override them. CB uses classes and element selectors nearly exclusive. All you need to do is copy those selectors, put them in your override.css, change the style, and save. Due to load order your override.css styles will always take place with same or greater selector weight.Which can probably be done via the main CSS file in your template using '!important'.
You can override the PHP file as well, but you need to change the filename and the PHP class names. However, my strongest advise is do not touch the PHP file. I can not possible think of a reason why you would need to modify the HTML structure that you can't do with CSS. When you override the PHP file it means you are no longer loading the default PHP file. This means when we make a bug fix to the templates PHP file you will not have the fix. When we add a few feature to it you will not have the new feature. In the future we'll have a better template system in place (frontend XML views like we use for backend) so this won't be a problem in the future.So example.php (in the example template) is not editable I guess. And if this was 100% needed, might as well just edit the CB core default.php file and make a note of it so that you can re-implement the edit if it gets overwritten during an update.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.