Performance is the one area of your site that you can make you or break you on the web. Testing out a lot of strategies and hearing about how removing .htaccess files would drastically increase your page speed, I had to put it to the test. The theory behind this tweak is that when AllowOverrides are turned on, Apache checks every single directory to see if an .htaccess file exists, and that this lookup costs valuable web server time in projects that have lots of files (such as Magento and Zend Framework) and could cause latency in page requests.
Sometimes it is necessary to create a custom layout file. Other times, you may need to define and set custom variables for use in your template file. This article demonstrates the ability to do both, in hopes to clarify the "Magento XML Magic" that is going on behind the scenes.
It is important to follow the MVC pattern, and keep data in models, logic in controllers, and use the view strictly to echo out data.
This example also shows you how to define a custom layout XML file in your module config, so you can update the layout XML from within your own module.
Working with git using remote branches is a great tool to manage workflow and coordinating code with other developers. However, the commands you need to remember could be quite daunting and even hard to remember for the experienced programmer.
A while ago, I stumbled across LESS CSS, a dynamic CSS processor which can greatly cleanse the amount of CSS in your website, and lead to generally more accessible cross-browser stylesheet conventions. LESS allows you to reuse your CSS snippets programmatically, and once you use it, you will never go back!
Jira is a totally wonderful piece of project management software, especially when coupled with the GreenHopper extension which greatly assists in Agile Development. That said, it's totally meant for programmers - so much so, that it requires a programmer to setup client access to specific projects. Jira's own documentation is pretty weak when it comes to setting up clients with access to one (or more) project.
To disable a static block globally, go to CMS > Static Blocks > Select One > set Status = Disabled > Save To control the disable of static blocks on various pages, to go CMS > Widgets > Select One > Reference 'Layout Updates' section To remove a specific block for a specific page, go to CMS > Pages > Manage Content > Select One > Click the currently published Revision number on the initial page > Click the Design tab on the left > In the Layout XML section paste in the appropriate block of code dependent on the block you want to remove, for example to
By default, Magento does not automatically add on trailing url's to the end of every URL. In a database-driven cms system, you will be penalized for this by having two urls' with duplicate content: http://yourinstall.com/home http://yourinstall.com/home/ In the case above, each of these url's will lead to the same content, causing search engines to spider both pages, and in turn penalizing your website for having duplicate content. You can either create a 404 error for one of the pages, or redirect everything to a standard url.
Magento had a great command line tool built into it's software build called 'pear' that was located in the root folder of Magento installations. Well... it's still there, it has just been renamed 'mage' and comes with different commands to update modules, the core, etc.
Your first step in using 'mage' is to set the proper permissions to make it executable by the executing user. This can be done with chmod from the root of your Magento install:
chmod 550 mage
Then, to run it, just type ./mage in shell. You will be presented with a list of arguments to pass to it: