Quote:
Originally Posted by qualiteam
....If you want to override admin, common and so on, you add them through that decorated getSkins() method, not from getSkins() defined in your Main.php
|
Ahhhhh Okay. It does work perfectly so far (with the exception of the .less file(s) which is unconnected we think) and that's using the setup we described above, which is the opposite to your last post (!) but obviously, we much prefer to have less processing!
So... remove the getSkins() coding from Main.php for these areas and then add it to the 'additional' file? That's what we think you're saying. We'll try it this weekend. An example has been added to the existing additional file coding, shown below for reference.
We did think about that after your initial very helpful post, but we couldn't understand how that would work, as the XC Crisp White Skin Module only uses getSkins() for the 'customer' area only... so we thought it would be limited as such... We don't have any knowledge of the logic rules involved, but we'll alter it and try it this way regardless.
PHP Code:
<?php
// classes/XLite/Module/*.*/*.*/CrispWhiteMain.php
namespace XLite\Module\*.*\*.*;
abstract class CrispWhiteMain extends \XLite\Module\XC\CrispWhiteSkin\Main implements \XLite\Base\IDecorator
{
public static function getSkins()
{
$skins = parent::getSkins();
$customCustomerDirectory = '*.*' . LC_DS . 'customer';
if (isset($skins[\XLite::CUSTOMER_INTERFACE])) {
// The original theme registers its own directory for the "customer interface",
// so we should combine ours with that one
$directories = (array) $skins[\XLite::CUSTOMER_INTERFACE];
$directories[] = $customCustomerDirectory;
$skins[\XLite::CUSTOMER_INTERFACE] = $directories;
} else {
// The original theme has no directory for the "customer interface",
// so we just add our directory to the list
$skins[\XLite::CUSTOMER_INTERFACE] = $customCustomerDirectory;
}
Example Addition:
$customCustomerDirectory = '*.*' . LC_DS . 'admin';
$skins[\XLite::ADMIN_INTERFACE] = $customCustomerDirectory;
return $skins;
}
}
Quote:
Originally Posted by qualiteam
...I'm waiting a reply from the XC5 dev team on this
|
No problem. If it's a .less file higher up that is overriding this one and others, then we can add that in, once we understand the logic rules.