Wow, part 4 already? This is where the real fun comes in, folks. Today we’ll be opening up some *.phtml and *.xml files, looking at what’s going on under the hood and finding out how the theme files all tie together. Lets get started, shall we?
Before we get to those files…
Folks, before we dive into the files, lets get some concepts down that are crucial to understanding how the Magento theme files play together.
Magento themes consist of, aside from styling assets (CSS, images, Javascript, etc) a collection of *.phtml (essentially, XHTML files that can execute PHP) and *.xml (Extensible Markup Language) files that make the theme work.
The *.xml files define blocks and regions, which template files get used for which blocks & regions as well as various attributes and parameters for each if these definitions, where applicable.
While the *.xml files tell everything where to be and what to look like, the *.phtml files contain the actual XHTML code required for each block and region.