Closed jahoora closed 3 years ago
Hi! Do you have compiled files? What local domain do you use?
Yeah, in attach files My domen is: http://localhost:8888/dps/ ΠΠΎΠ²Π°Ρ ΠΏΠ°ΠΏΠΊΠ° 2.zip
Please fix path to css/js files in tempalte file. Template has absolute path. For example: /themes/***/assets/css/common.css If you uses folder (dps) for your root folder, then you should fix absolute path and add "dps" folder to assets path.
thank you
Let me know please what a "template file" you mean?
I mean "layouts" files
This is original code in main layout : `<?php function onInit() { $this['path_css'] = mix('css/common.css', 'themes/'.\Cms\Classes\Theme::getActiveTheme()->getDirName().'/assets'); $this['path_js'] = mix('js/common.js', 'themes/'.\Cms\Classes\Theme::getActiveTheme()->getDirName().'/assets'); $this['cart_is_available'] = false;
/**
* Check if Cart component has been registered and autoload it
**/
$obManager = \Cms\Classes\ComponentManager::instance();
if ($obManager->hasComponent('Lovata\OrdersShopaholic\Components\Cart')) {
$this['cart_is_available'] = true;
$this->addComponent('Lovata\OrdersShopaholic\Components\Cart', 'Cart', []);
}
if ($obManager->hasComponent('Lovata\MightySeo\Components\SeoToolbox')) {
$this['seo_toolbox_is_available'] = true;
$this->addComponent('Lovata\MightySeo\Components\SeoToolbox', 'SeoToolbox', []);
}
}`
Here for example i add "dps" for path_css
`<?php function onInit() { $this['path_css'] = mix('css/common.css', 'dps/themes/'.\Cms\Classes\Theme::getActiveTheme()->getDirName().'/assets'); $this['path_js'] = mix('js/common.js', 'themes/'.\Cms\Classes\Theme::getActiveTheme()->getDirName().'/assets'); $this['cart_is_available'] = false;
/**
* Check if Cart component has been registered and autoload it
**/
$obManager = \Cms\Classes\ComponentManager::instance();
if ($obManager->hasComponent('Lovata\OrdersShopaholic\Components\Cart')) {
$this['cart_is_available'] = true;
$this->addComponent('Lovata\OrdersShopaholic\Components\Cart', 'Cart', []);
}
if ($obManager->hasComponent('Lovata\MightySeo\Components\SeoToolbox')) {
$this['seo_toolbox_is_available'] = true;
$this->addComponent('Lovata\MightySeo\Components\SeoToolbox', 'SeoToolbox', []);
}
} ?>`
but after change i have exception
Hello, please help me I have problem, after compiled npm run dev not load css style on index page