Section wrapper
Hi team,
Currently, I saw that each row of page builder is wrapped by Section shortcode even it's not dragged into Section shortcode. So could you help me to identify whether a row is wrapped by Section or not ?
Hello @maiakhoa.
You are right, the builder wraps shortcodes into sections, rows and columns. It does that to form a correct grid. This process is called correction, it occurs when saving or updating a post from the dashboard.
Not sure that I understood you correctly but if you are asking how to identify if a user actually dragged a section himself or if it was added automatically by the builder in the correction process then there is a auto_generated key in the $atts variable that is passed into the section shortcode's view.
To make use of it you can overwrite the view file by creating a copy of it in {your-theme}/framework-customizations/extensions/shortcodes/shortcodes/section/views/view.php and modify it to suit your needs.
Note that the auto_generated key was added to the framework in a later version so make sure you update the framework and it's extensions before doing this.
Thank @rockalife. But could you tell me the version that having auto_generated key in the $atts variable ? I have just upgraded to the latest version of framework but can not see that key name.
Thank @rockalife so much. I found out that key. Sorry I forgot to update extensions.
No problem @maiakhoa, glad I could help.