Support

Account

Home Forums Add-ons Flexible Content Field Changing the order of rows with flexible content Reply To: Changing the order of rows with flexible content

  • I think that the main issue you’re seeing is that you do not have both layout nested in the first while have_rows() statement, but I could be wrong. I think it should look something like this… i’ve shortened this to only have what is needed to make it easier to see.

    
        if( have_rows('zwei_spalten')):
            while ( have_rows('zwei_spalten') ) : the_row();
                $layout = get_row_layout();
                if ($layout == 'zwei_spalten_inhalte') {
                    // code to output zwei_spalten_inhalte
                } elseif ($layout == 'drei_spalten_inhalte') {
                    // code to output drei_spalten_inhalte
                }
        // rest of your code here.....