Hi I'm lookibg for a strategy to give priority to file for-B over File-A. Allow me to explain.

I'm running Joomla and My template is within Blocks that are all imported and became a member of within the primary index.php file.

Allows us say I've 2 folders FOLDER-A and FOLDER-B

FOLDER-A CONTENTS:

mind.php

header.php

mainbody.php

footer.php

I'm while using following function to encourage them to my index.php file:

function getBlock($filename)

and that i give them a call as:

<?php className::getBlock('head') ?>

<?php className::getBlock('header') ?>

<?php className::getBlock('mainbody') ?>

<?php className::getBlock('footer') ?>

Now I wish to create a choice of changing these core files without disturbing the initial.

Therefore if one really wants to make changes towards the Primary Body he then copies the file mainbody.php to some filder known as FOLDER-B and includes the alterations there.

What exactly I'm searching for is really a function which inspections FOLDER-B first and when personal files with similar title of it's counterpart as with FOLDER-A is available, it must load that otherwise it will load the regular file from FOLDER-A.

Like:

function getBlock($filename)is available($fileB))  else 



?

function getBlock($filename)is available($file) )