1259 Posts in 348 Topics by 484 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 399 Views |
-
Sub Themes and Modules

2 February 2012 at 3:17pm
According to http://doc.silverstripe.org/sapphire/en/topics/theme-development I can create sub theme, like "myTheme_forum", copy forum CSS, customize, and it should work....
However, it doesn't work on a few modules
It works on the for the Blog module, and eCommerce, but doesn't work on the FORUM module.
I know one way of fixing it (in forumholder.php parent::init(); needs to be above the list of required files), but this required changing code in the module - which I shouldn't need to do.
Seeing as the forum module is used by SS in their own example, I would expect it to work. So - am I missing something?
-
Re: Sub Themes and Modules

2 February 2012 at 4:04pm
In fact, in the eCommerce, subthemes work with the product page, but not the checkout page. Again, the code is
public function init() {
if(!class_exists('Payment')) {
trigger_error('The payment module must be installed for the ecommerce module to function.', E_USER_WARNING);
}Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript('ecommerce/javascript/CheckoutPage.js');
Requirements::javascript('ecommerce/javascript/ecommerce.js');
Requirements::themedCSS('CheckoutPage');$this->initVirtualMethods();
parent::init();
}where i think it should be (note the position of parent::init();)
public function init() {
parent::init();
if(!class_exists('Payment')) {
trigger_error('The payment module must be installed for the ecommerce module to function.', E_USER_WARNING);
}Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript('ecommerce/javascript/CheckoutPage.js');
Requirements::javascript('ecommerce/javascript/ecommerce.js');
Requirements::themedCSS('CheckoutPage');$this->initVirtualMethods();
}
I'm trying to build some new all purpose themes, so I'd like to get this working by only using the templates... either that or the owners of the modules could update the code!
| 399 Views | ||
|
Page:
1
|
Go to Top |

