0
votes

Assume that i am working in a Joomla 2.5 team. I am a "good" template designer and other are "bad" component developers, just kidding.

Some day, they completed a perfect "PC Management" component. Yes, i was really happy when with this component structure, i could paint a good looking layout into Photoshop and convert to HTML and CSS successfully! Boss was satisfied. Website worked perfect.

But yesterday, component developers group had got some new idea. They added some new fields with a lot of new div tags, they also changed class some div tags. My template was broken. I know to how to override layout with html/component_name folder. But if there are any additional items to component, i again copy component view folders to my html folder, correct?

My question: Is there any idea about "perfect" relationship between template and component in Joomla? I mean, in my case, if component structure changes, must i change my template too? Do my team have to discuss some any changes? Do i have got any else choices to work isolatedly.

Sorry because of my bad English! Thank you!

1

1 Answers

2
votes

First, once you have added a template override to templates/YOUR TEMPLATE/html/component_name you should not have to do anything when a component is updated. The override folder is not touched by components by design. The only issue you might have is if they dramatically change how the component works and the override is no longer compatible.

As for the interaction between component devs and templates, there is a lot a component dev SHOULD do to keep the impact on a template low. First, they should standardize the CSS ids and classes they use. Next, they should avoid inserting any inline CSS or hard coding anything that should be part of the template. Any markup in the components core views should follow best practices and be W3C valid code. It should go without saying that the component should also be proper Joomla MVC so overrides work as intended. A component done well should drop in to any template without breaking anything.