Easy ways to manage the blocks
When managing a Magento theme, it’s understandable that many may want to edit some of its block content. In an attempt to help you with this, today’s post will show you some tips on how to edit the content you want.
Easy ways to manage the block’s content.
This guide will take Bookshop theme as an example.
Step 1: Find out where the block is located
Below is how you do this.
#1. Login to backend
#2. Go to System >> Configuration
#3. Change Default Config to English
#4. Click on ADVANCED >> Developer tab
#5. At the Debug tab, change the settings of Template Path Hints as the screenshot below
#6. Click Save and go to the frontend to see where your block is located
The example below is the frontend of Bookshop theme after changing the settings of Debug tab
You can follow the red link to find the file containing that block
Step 2: Edit block’s content
There are many ways to manage the content of a block. It depends on how you use the layout. In this post, we’ll show you three most basic methods to edit block’s content.
1. Edit block’s content from backend
Most static block of your theme can be easily edited from the backend. The example below shows you how to edit the block at position-10 in Bookshop theme.
All you need to do is to directly edit that block in the backend.
Please note that, this example only demonstrates how to edit the block title. For other editing like configuring items or extensions, you need to see more at related documentation on extension guide or creating static block.
2.Edit block’s content from theme folder
For some blocks, you need to go to the theme folder to manage them.
For example, the title of block position-3 can’t be edited from the backend, since its title is managed from the file fourthproduct.phtml.
Below is how the frontend looks in Debug mode.
This fourthproduct.phtml file is located at app\design\frontend\default\jm_book\template\joomlart\jmproducts
You need to open the file then find the title TODAY HIGHLIGHT and edit it.
3. Edit block’s content from Magento base
Some blocks are overwritten from Magento base and you can not file any information about it in the user guide. They are not managed in the back end.
Let’s take Browse books block for example.
Similiar to the two parts above, you need to navigate to\app\design\frontend\default\jm_book\template\catalog\layerthen open the view.phtml file and edit its title.
Step 3: If your modifications show no change at the frontend, please clear cache and reindex date. The changes from backend will be reflected right away.
If you still have trouble with editing block’s content, let’s submit us a ticket. We are more than happy to help.
Please note that the three methods above are the most basic ones to edit block’s content.
If you want to configure more, you need to have certain knowledge about the file structure, html & css, in which this post alone can not cover all.
We hope this guide will help you manage Bookshop theme as well as any other theme’s block content much easier.