Is it possible to add a switch to admin section ?
Our client wants to have a news section on the frontpage, which is collapsed by default. With javascript it is possible to open/collapse this frontpage. This part I have implemented.
However, there are situations that the news section is so important, that the default state should be open instead of collapsed. Our client wants to control this himself, so we thought of implementing a switch in the admin section which decides whether the section is visible or collapsed. I can then in code read the value of this switch and give it to the template.
Now my main question - is this possible to do in EzPublish 5? And if so: how ?
You can solve this by adding a checkbox to your 'news' class and ask the customer to check this checkbox when he needs this opened. And you can access the value of this checkbox by an if statment and set the position to collapsed or not-collapsed.