Create Custom css file in 5.0.12
I want to create a custom css file that I can use to override template default css rules and I don't want to use the Template Tweaker.
I am following these instructions, but they don't work; my css file link is not added to the head. Yes, I did rebuild the cache. http://kb.x-cart.com/display/XDD/Adding+new+CSS+file I created a module in /classes/XLite/Module/Wolf/CustomCss/View/AView.php I also created the module dir in the skin: /skins/default/en/modules/Wolf/CustomCss/last.css Below is the code in AView.php: Code:
<?php Any idea why it does work? Environment Info: Core version: 5.0.12 Installation directory: /home/wolfstyl/wolfstylestore PHP: 5.3.28 details >> MySQL server: 5.5.33-31.1 (InnoDB engine support enabled) Web server: Apache Operating system: Linux XML parser: found GDLib: found (0) Translation driver: Database Curl version: 7.19.7 Thanks |
Re: Create Custom css file in 5.0.12
Did you click on ENABLE in the module
EXTENSIONS -> INSTALLED MODULES |
Re: Create Custom css file in 5.0.12
According to the instructions, you don't create the main.php file, only the module file. However, I did create a main.php file and the module shows up in admin / modules, but it is impossible to enable it. Even after compile, it is not checked as enabled.
|
Re: Create Custom css file in 5.0.12
Can you post what you put in for your Main.php (should be located physically in classes/XLite/Module/Wolf/CustomCss)? My best guess is that there is an error in the namespace in that php, it should be
PHP Code:
Hope this helps, -Mark |
Re: Create Custom css file in 5.0.12
Here is main.php
Code:
<?php |
Re: Create Custom css file in 5.0.12
Search for this:
XCFix-MobileCSS-v5_0_0 I followed Tonys example on this and it worked great for me. This is for mobile but I moved it around slightly and it works. |
Re: Create Custom css file in 5.0.12
From what I can tell, it *should work*. That said, you can try this for your AView.php:
PHP Code:
That's what I do for my own custom CSS... |
Re: Create Custom css file in 5.0.12
Hi Mark,
Thanks for the file. I tried that but it still doesn't work. Also strange, even though the Theme tweaker enabled, that doesn't work either. |
Re: Create Custom css file in 5.0.12
Quote:
Main.php is the "descriptor" file that tells X-Cart 5 about the module and explains how X-Cart 5 can use it. Every X-Cart 5 module require this file: http://kb.x-cart.com/display/XDD/How+to+create+a+module What do you mean by saying that it is impossible to enable your module? Is the checkbox disabled? Usually for a new module you are to rebuild the cache twice: the first time to get the new module show up in the list, and the second time after ticking the Enable checkbox next to the module and submitting the form to the server. Quote:
It may be your browser cache. Does CTRL+F5 (or CTRL+R) help? You may also try to clear the browser cache from the browser menu. |
Re: Create Custom css file in 5.0.12
What I mean by "impossible to enable it" is this: I can see the module, I click the checkbox to enable it, I click save, the compiler runs, but the module is still unchecked; eg, not enable. I have done this dozens of times, but the module is never enabled. There are no error messages.
Thanks |
All times are GMT -8. The time now is 09:13 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.