Reputation: 533
The main reason I like creating a fresh package is that it allows you to keep a clean separation between your store themes and the default bundled Magento themes. On the other hand most extensions install layout and template files to app/design/frontend/default/default/ and if your theme is installed under the default package magento will find the extensions frontend files or else you'll have to copy extension files to app/design/frontend/package/default/ always. So it's a little more work using your own package.
I'm curious to see if I'm missing anything else so what are some of the benefits of creating your own theme package in Magento as opposed to using the default package?
Upvotes: 4
Views: 5022
Reputation: 179
the default/default package is bad designed from my point of view. If you use your own package the extensions cannot use your default-directory (?Right?). I would suggest to add a field default-package.
I use this work-around now - config.xml:
<core>
<rewrite>
<design_package>Your_Extension_Model_Design_Package</design_package>
</rewrite>
</core>
Model/Design/Package.php
class Your_Extension_Model_Design_Package extends Mage_Core_Model_Design_Package
{
/**
* Use this one to get existing file name with fallback to default
*
* $params['_type'] is required
*
* @param string $file
* @param array $params
* @return string
*/
public function getFilename($file, array $params)
{
Varien_Profiler::start(__METHOD__);
$this->updateParamDefaults($params);
$result = $this->_fallback($file, $params, array(
array(),
//'_package' is new. Uses this package when looking for default theme
array('_theme' => $this->getFallbackTheme()),
array('_theme' => self::DEFAULT_THEME, '_package' => 'default'),
));
Varien_Profiler::stop(__METHOD__);
return $result;
}
}
Upvotes: 0
Reputation: 1646
The two folder /app/design and /skin are identical(Mirror image we can say).Keep all the css,image files under /skin/your_theme directory and .phtml for layouts in /app/design/your_theme folder.
Upvotes: 0
Reputation: 1458
If you use default/default, and third-party extensions you use place their files in default/default, then you can't override those files - you have to edit them directly.
So, by
you can override only the templates/layouts you need in your package.
Upvotes: 2
Reputation: 1775
First of all, creating a new package is something that Magento Official user guide is required to do.
http://info.magento.com/rs/magentocommerce/images/MagentoDesignGuide.pdf
Here is what it says: "Please ignore legacy Magento instructions and tutorials that instruct you to create your custom theme inside of the default design package, or to edit files in the default/default directory directly. Rather, the method that affords the best upgrade path for your theme and the most protection from accidental changes is to create a new design package and to create your custom theme inside of there."
My personal logic for creating a new package is if Magento requires few store views and they have differences, I need to have my own 'default' theme and that's exactly what I get by creating my own package (Magento will look for files in the my_theme theme in custom design package, then in the default theme and then fallback to the base package)
Upvotes: 11