Doing this with Jquery, so less customized templates to have to maintain
Add this to to either
PAGE_CONTAINER template before the closing </head> tag, or to the bottom of
helper_js_global before the closing </xf:macro> tag to have it show up everywhere (Resource category lists, etc):
Code:
<xf:js>
$(".categoryList-toggler, .toggleTarget").each(function() {
$(this).addClass("is-active");
});
</xf:js>
If you want it to auto-expand XFMG category lists only, you could add it to
xfmg_media_index and
xfmg_category_container.
You can also create a custom Style Property to control whether the groups start expanded or not. To do so,
enable designer mode and create a custom value/boolean Style Property, say in XFMG: Appearance. After creating the property, change the code earlier to the following:
Code:
<xf:if is="property('myCategoryToggleProperty')">
<xf:js>
$(".categoryList-toggler, .toggleTarget").each(function() {
$(this).addClass("is-active");
});
</xf:js>
</xf:if>
Then just change the name of the property above (
myCategoryToggleProperty) to the one you created.
Let me know if this works for you!