But this doesn’t seem to work. not sure if I’m not supposed to nest another if loop into that existing one that gathers the images. From my understanding it should get which of the buttons is activated and set the class accordingly. but still, i can not make sense of the bool function at all
Anyone can shed some light?
Thank you all for your answers. @texnixe I went for toggles instead of toggle because i found it a better UX being able to see both options at a glance. Toggle only shows option b if activated.
Still it does not work unfortunately. Whatever I do, it goes for the second value (after “else”) no matter what value is set in panel. I tried it with existing pages as well as with creating a new one.
mytoggle:
type: toggles
label: Width
options:
- Full
- Half
The posts save beautifully, everything is visible in the related .txt file. I even checked if there’s some trouble with uppercase/lowercase but it isn’t. The php code still skips over to what comes after the else statement.
true, that’s a leftover from my trial & error troubleshooting attempts. sorry for that. still, as mentioned above, I tried all possible upper/lowercase configurations possible to no avail. i’m stuck.
probably yes, i don’t know. if i change class=“full” to class=“half” in php it does that. but only that. I can not switch to the other case by toggeling the toggle in panel. As I already mentioned, the value is written to the content .txt file correctly. There must be something weird going on in my php script.
Thank you a lot, this finally works! The if statement had it’s origin in my css structure somehow. I’m still not sure why it does not work. Anyways, i’ll mark this as solved.