Andreas
Andreas

Reputation: 2678

Joomla: Using the same override in two different templates

I am working with Joomla 1.5 and using two different templates. To customise the frontend, I am overriding components and modules in /template/myTemplate/html/componentOrModule/. In a few cases I need the same overide in both templates.

Until now, I am using include to reuse the code. But it is still annoying, that I have to create the folders and files twice.

I reckon, that there is a better/easier way of doing it. But I do not have clue.

Did someone have the same problem and has already solved it? Any ideas appreciated.

Upvotes: 1

Views: 134

Answers (1)

Hackwar
Hackwar

Reputation: 353

There is no Joomla solution to this issue. My proposal would be to have a stub file in your template html folder and then include that file from a third folder. Something like the following:

/templates//html/com_content/article/default.php

You can copy that file into all the relevant override folders and then have one folder in the templates folder named "common" where you have the actual files with the output.

Upvotes: 2

Related Questions