Exploit
Exploit

Reputation: 6386

Is it safe to only modify phtml files in magento?

Is it safe to only modify the phtml files and the css,js files in magento and never touch the xml files? The way i see it is the phtml files are much easier to work with rather than the xml files.

Upvotes: 0

Views: 160

Answers (2)

benmarks
benmarks

Reputation: 23205

It's possible, but this is really not a great attitude. An analogous thought would be, "It's much easier to edit HTML instead of PHP, so I'll just do what I can there." Hopefully that demonstrates how limiting your approach can be. That said, if the only changes which you need to make reside in templates alone (a rarity, mind you), then you are good to go.

However, there are certain things that can only be done by editing layout XML. For example, if you need to display a block from the right column inside the product view block only, you will need to edit layout XML as well as the product view block's template file.

If you can navigate your way through the various templates, an understanding of how to work with Layout XML is not far behind.

Upvotes: 1

Max
Max

Reputation: 8836

Yes, its possible. The layout xml is for if you want to use different phtml, css, or js files. But if all you want to do is adjust the existing files, you should be fine.

Upvotes: 0

Related Questions