Conditional display of style properties

Arty

Well-known member
Many style authors have created frameworks for styles with many options for users to choose from. When there are too many options, style properties list becomes very cluttered, displaying style properties for features that are not enabled.

I suggest to add conditional statements to style properties, allowing to show/hide style properties depending on value of another style property.


For example, style has optional navigation layout, that is enabled with checkbox "myNavigation". Then it has properties to configure it: "myNavigationTabs", "myNavigationSelectedTabs", etc. Those style properties are enabled in template like this:
Code:
<xen:if is="@myNavigation">
.tabs
{
   {xen:property myNavigationTabs}
}

.selectedTabs
{
  {xen:property myNavigationSelectedTabs}
}
</xen:if>
and therefore do not work unless property myNavigation is enabled. So there is no point in showing those properties in admin panel.

I suggest to make it possible for style authors to toggle style properties using conditional statements like
Code:
@myNavigation == 1
that use values of other style properties and XenForo options to show/hide style property. Value format could be a simple conditional statement used by template engine.
 
Upvote 8
Back
Top Bottom