rafique12
asked on
Magento grid layout
Hi guys,
I hit a bit of a brickwall with my Magento development. I'm trying to create a simple area on the hompage where I can showcase any special offers etc and will need to tweak the layout I'm after something very similar to this: http://www.play.com/ (directly under the slider).
I have created a file called addboxes.phtml but am not sure if I also need to create a block in the local.xml file and reference addboxes.phtml from there?
Could someone please give me some advice please as I'm very stuck...
I hit a bit of a brickwall with my Magento development. I'm trying to create a simple area on the hompage where I can showcase any special offers etc and will need to tweak the layout I'm after something very similar to this: http://www.play.com/ (directly under the slider).
I have created a file called addboxes.phtml but am not sure if I also need to create a block in the local.xml file and reference addboxes.phtml from there?
Could someone please give me some advice please as I'm very stuck...
ASKER
Thankyou for your reply,
unfortunately I am not getting any content displayed. I added the following code to my homepage design area under Layout Update XML:
Here is a test from addbox.phtml
unfortunately I am not getting any content displayed. I added the following code to my homepage design area under Layout Update XML:
<reference name="content">
<block type="catalog/addbox" name="catalog.addbox" template="catalog/addbox.phtml" />
</reference>
Here is a test from addbox.phtml
<div class="thumbnails"><img src="http://placehold.it/220x220"></div>
Couple of things.
In your XML you are creating a block with a class of catalog/addbox. Unless you've created this class yourself (or downloaded as plugin), it doesn't exist. Looking at the content of your template files you need to set this to core/template as in my previous example.
In your template file, are you sure that is a correct url for an image - http://placehold.it/220x220 doesn't look like an image.
In your XML you are creating a block with a class of catalog/addbox. Unless you've created this class yourself (or downloaded as plugin), it doesn't exist. Looking at the content of your template files you need to set this to core/template as in my previous example.
In your template file, are you sure that is a correct url for an image - http://placehold.it/220x220 doesn't look like an image.
ASKER
Yes that is just a test image and renders if I create static block and use static HTML.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<reference name="content">
<block type="core/template" name="homepage.boxes" template="addboxes.phtml" />
</reference>
Depending on the functionality you need in addboxes.phtml, you may need to change the block type. Also check the path to your template file.