Unyson-Shortcodes-Extension icon indicating copy to clipboard operation
Unyson-Shortcodes-Extension copied to clipboard

How do I change the "fw-row" class in the Section shortcode?

Open jonmlas opened this issue 9 years ago • 2 comments

Hi,

I have a custom Section shortcode and I want to add an option that allows equal height columns. Basically, I want to do something like this http://getbootstrap.com.vn/examples/equal-height-columns/.

So, in order to do that I need to be able to add the class "row-eq-height" after fw-row. Is it possible?

I don't want to modify the Row shortocde. I just want it inside the Section. So when the user checks the Equal Row Height option, the ouput will insert the class "row-eq-height" after fw-row.

I'm thinking perhaps I might be able to change the config on the fly by using this code: $row_class = fw_ext('builder')->get_config('grid.row.class');

I only know how to fetch the value but I don't know how to filter it in the row.

Thanks!

jonmlas avatar Mar 02 '17 04:03 jonmlas

You cannot get the parnet shortcode properties to be able to know how the current row shortcode should behavior. but you can overwrite the section shortcode view and add there the desired class in that section.

Something like this:

.section.equal-height > .fw-row {
    /* Add the necessary CSS code there */
}

GheorgheP avatar Mar 10 '17 13:03 GheorgheP

ok thanks! that's my last resort.

jonmlas avatar Mar 10 '17 16:03 jonmlas