Category dropdown element

To get an treelike drop-down option field for all existing categories in the system you have yo add an own source model:

Now you can just use this source model in your modules system configuration file to generate a category selection:

For more information about system.xml field definitions have a look at the blogpost System configuration fields.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.