Is there any way to assign menu icon for flask-admin generated category link?

1.8k views Asked by At

Is there any way to assign menu icon for flask-admin generated category link?

We can set the icon for menu item via

menu_icon_type=ICON_TYPE_GLYPH, menu_icon_value='glyphicon-tags'

But I didn't see any such named parameter existing for category link.

1

There are 1 answers

0
pawl On BEST ANSWER

This was recently added as a feature in this pull request: https://github.com/flask-admin/flask-admin/pull/950

Now you can use category_icon_classes when you initialize Admin, like this:

admin = Admin(
    app,
    name='My Admin',
    category_icon_classes={
        'Profiles': 'glyphicon glyphicon-wrench',
    }
)