Tag Archives: CMS
Adding and removing javascript / css when and where you need it
Posted on 19. Feb, 2009 by Fido .
Adding and removing javascript and css is handled separately within Magento. CSS is added in the usual fashion, where you have a <link rel=”stylesheet”… />. However, any included javascript (unless linked to “by hand” from a theme’s skin) is pulled via a php files which reads through the “js” folder in the root directory (root/js/index.php is responsible for this).
That is all well and good for Magento. The real question is how we, as developers, add these items when we need them. How you as a developer add css or javascript is, luckily, handled the same.
In this post, we will show how to add and remove javascript and css to a CMS page (and anywhere else) that you may need.
Continue Reading
Run Magento Code Outside of Magento
Posted on 03. Nov, 2008 by Fido .
Hi All -
Finally time for a new post! (Something I’m surprised I haven’t covered yet).
This post will inform you on how to run Magento code outside of Magento. All you need is to have access to Magento’s ‘app/Mage.php‘ file.
This will be handy code for a few things:
- Integration with 3rd party items – shared sessions, or just shared themes
- Ajax calls – although not the preferred solutions for Ajax calls, it is a quick and easy one
Continue Reading
Create a simple custom module
Posted on 11. Sep, 2008 by Fido .
Part of customizing Magento is, of course, creating custom Modules. These allow you to inject functionality anywhere, whether in a “static” block fashion that’s more than static, or a shipping/payment module, or large module to do something as large as integrating a 3rd party system (or multiple systems).
There are many things custom Modules can do, from editing your Database, to handling module upgrades to overriding classes (Blocks, Controllers, Models) … and more!
Continue Reading
Editing the Footer in a stock magento build
Posted on 02. Sep, 2008 by Fido .
The items in the footer area are in two different locations. One part is a static block created within the magento admin area (CMS > Static Block). The other part is held in the related .phtml / .php / .xml files within the design files.
First off, the XML files…
Continue Reading
Using PHP code on a CMS page (custom Block/module)
Posted on 02. Sep, 2008 by Fido .
If you have ever wanted to do some sort of PHP processing within a CMS page that you created, here is how you do it.
A limitation of this tutorials is form processing. That involves creating and/or extending and/or overriding a controller class (which I’ll save for another day).
This code will allow your code to accept arguments, making it handy for some sort of dynamic use!



