We'll start with a quick Hello World via a display block. This process is more complex than displaying a message directly, but it shows us the fundamentals of what we'll be trying to achieve in this chapter. With the exception of simply typing Hello World in an existing template block, this is the quickest way of getting our own template block into Magento's display system.
We'll start the process by setting up the template itself with our Hello world
statement inside of it.
First, we'll create the directory /app/design/frontend/default/default/template/hello/
and create/place the file world.phtml
within it. Hence, the full address should be /app/design/frontend/default/default/template/hello/world.phtml
.
Next, we'll insert our Hello World
text within the file:
<h2>Hello World!</h2>
We've placed an <h2>
tag on either side of the statement so that it stands out on screen.