Book Image

Mastering Magento Theme Design

By : Andrea Sacca
Book Image

Mastering Magento Theme Design

By: Andrea Sacca

Overview of this book

Table of Contents (18 chapters)
Mastering Magento Theme Design
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Advanced options features


There are some features that you can add to the options to create a very modular and advanced configuration panel, such as the dependent field and the option to add JavaScripts inside the comment tag. Let's analyze these features.

A dependent field

One of the advanced features is the <depends> tag to create dependent fields. When navigating the configuration of Magento, you may have noticed that sometimes when you you switch from Yes to No, some options disappear and if you select Yes, they reappear.

This is illustrated in the following screenshot:

In the preceding screenshot, you can see some options after the first one, and in the following screenshot, you can see that by selecting No, some options below it disappear:

The options disappear because that field depends on the first one. Any field can depend on another one.

To create a dependent file, you simply need to add the following code to one of the fields that you want to make visible or not:

<depends&gt...