On my current project, I have certain **sections** created for some custom **Page Template**s.
So I am wondering if its possible to that I can show / hide certain sections based on certain Page Template selection?
I can implement a custom solution for my needs, but as I am not much familiar with Backbone / Underscore, so I don’t want to spend too much time learning them so if you have any suggestions please let me know.
The models for sections aren’t publicly available to interact with in the current release. However, in the dev branch on GitHub, they are. There are functions for working with them. Here’s how you’d get a model:
var section = butterbean.models.get_section( 'your-section-id' );
I just pushed some code live that should make this work better on the dev branch.
Right now, setting an entire sections to inactive status doesn’t work so well. So, setting a control’s active attribute to false is the best course of action. I’m going to have to rethink some of the architecture for sections to behave correctly.