Finding Correct Templates and Blocks in Magento

后端 未结 1 998
囚心锁ツ
囚心锁ツ 2021-01-24 05:55

I\'m trying to make a change to the Magento onepage checkout page. I\'ve done a search

$find . -iname *onepage*

and I\'ve gotten 5-6 results fo

1条回答
  •  一整个雨季
    2021-01-24 06:07

    You have the option of using Template Hints. This is a very nifty tool for Magento developers. Template hints will show where to find every visible file on every page of your Magento site. Log into the back end and follow the pictures to see how to turn them on for the front end. enter image description here-dont wanna enter image description here enter image description here Set both Template Path Hints and Add Block Names to Hints to yes. and Voila, you're site should be looking something like this: (Also, Template Path Hints are not shown in the default site scope by default, you may need to select a specific site to enable them for): enter image description here

    Now what if you need to make changes to the back end (administration panel)? This part is about just as easy, although you will have to make some changes to some code. In your

    app/code/local/Mage/Core/etc/system.xml
    

    directory there is a block of code that will look like:

                            
                            select
                            adminhtml/system_config_source_yesno
                            20
                            0
                            1
                            1
                        
                        
                            
                            select
                            adminhtml/system_config_source_yesno
                            21
                            0
                            1
                            1
                        
    

    Now change both of the show_in_default settings from 0 to 1. Return to the admin panel > System > Configuration > Developer under the default site scope and you will have the options to enable template path hints and block names. If you set both of those to yes now, it will enable template path hints for the administration panel.

    0 讨论(0)
提交回复
热议问题