Hello Stefan,
Am 11.05.2012 15:20, schrieb Stefan Moises:
This works for my admin class, but not for oxajax.php...
I also can't set the path for this include file in my metadata.php,
because it isn't a "real" class like the main admin class:
'files' => array(
'smxb2b_accounts_main' =>
'shoptimax/smxb2b_accounts/admin/smxb2b_accounts_main.php',
'ajaxComponent' =>
'shoptimax/smxb2b_accounts/admin/inc/smxb2b_accounts_main.inc.php',
...
I've tried to set the path for "ajaxComponent" as you can see, but of
course this isn't working either...
So is there any way I can get oxajax to load my include file from the
modules directory, or do I have to copy it over to the "/admin/inc/"
dir of the shop (which would break the whole concept :P)
The "admin/inc/"-Container is identified by the "container"-parameter.
The oxajax.php script is called directly and not through the
shopcontrol, but the modules/functions.php is included. So you can set
your include-path in this modules/functions.php to resolve "include_once
'inc/'.$sContainer.'.inc.php';" in oxajax.php on 748 (OXID 4.6.0). Did
you try this allready?
And another "path question": is there a way to load the
"bottomnavicustom.tpl" from my module folder, too? E.g. this doesnt
seem to overwrite the default template:
'templates' => array(
"bottomnavicustom.tpl" =>
"shoptimax/smxb2b_accounts/out/admin/tpl/bottomnavicustom.tpl",
"smxb2b_accounts.tpl" =>
"shoptimax/smxb2b_accounts/out/admin/tpl/smxb2b_accounts.tpl",
The Module-Templates are saved in the config var "aModuleTemplates"
which are called in oxconfig::getTemplatePath after the standard logic:
public function getTemplatePath( $sFile, $blAdmin )
{
$sTemplatePath = $this->getDir( $sFile, $this->_sTemplateDir,
$blAdmin );
if (!$sTemplatePath) {
$sBasePath = getShopBasePath();
$aModuleTemplates = $this->getConfigParam('aModuleTemplates');
So there is no way to "override" a default template with this way. But i
suggest to overload oxUtilsView::getTemplateDirs to add your own
template dir first for overwriting this template and load your template
first.
Regards,
Björn
--
___________________________________
WBL Konzept, Beerden&Lange GbR
Björn Lange
Geschäftsführender Gesellschafter
Luxemburger Straße 266
50937 Köln
Telefon: 0221 282 755 82
www.wbl-konzept.de
www.facebook.com/wbl.konzept
b.la...@wbl-konzept.de
_______________________________________________
dev-general mailing list
dev-general@lists.oxidforge.org
http://dir.gmane.org/gmane.comp.php.oxid.general