I’m trying to find a handy way to fully exclude designated row from rendering. Not just visually hide row with “display: none;” style but fully remove that row’s code from html output at php stage.
Obviously (I guess =) it will be very handy for draft rows or rows which aren’t needed for a some time. Or even a row for some dev’s commentaries.
Are there a way besides of tweaking php code myself?
Regards!
Hi Kirill,
Unfortunately, there’s no way to currently do this outside of using PHP at this time. If you’re familiar with PHP, I would recommend taking a look at the developer docs on how to do this.
Thank you Alex for answer!
Well… I guess it would be cool too have a small addon for Page Builder Row properties window with one “Turn Off” (or “Draft”) checkbox. Maybe I can manage it myself. =)
Could you please give some advice? Are there any similar addons as a good example to start with?
Regards!
Hi Kirill,
I would create a new row style (for widgets, simply replace row with widget in the hook names) and then I would use siteorigin_panels_layout_data to filter out rows from the output. Code wise, that would look something like this:
Please note that the above code is untested so there may be a mistake. It also doesn’t run checks against widgets.
Thank you very much Alex!
>> Please note that the above code is untested so there may be a mistake.
Of course! I’ll take it as a basis to dig deeper. =)
Regards!