Support

Account

Home Forums Add-ons Flexible Content Field How to inherit not all the content is flexible, and part of it?

Unread

How to inherit not all the content is flexible, and part of it?

  • Hi. The site has two pages (parent and child).
    For the structure of the parent use flexible content field.

    <?php
      if( have_rows('layout_flexible') ):
        while ( have_rows('layout_flexible') ) : the_row(); ?>
        <?php get_template_part( 'inc/first-screen' ); ?>
        <?php get_template_part( 'inc/adv' ); ?>
        <?php get_template_part( 'inc/price' ); ?>
        <?php get_template_part( 'inc/form-inpage' ); ?>
        <?php get_template_part( 'inc/defects' ); ?>
        <?php get_template_part( 'inc/brands' ); ?>
        <?php get_template_part( 'inc/models' ); ?>
        <?php get_template_part( 'inc/location' ); ?>
        <?php get_template_part( 'inc/steps' ); ?>
        <?php get_template_part( 'inc/text' ); ?>
      <?php endwhile;
        else: // no layouts found
      endif; 
      ?>

    <?php get_template_part( 'inc/first-screen' ); ?> – the individual blocks inside flexible.

    Is it possible to transfer the contents of some blocks to a child page?

    If I pass in the parameter have_rows id of the parent:

    <?php
      if( have_rows('layout_flexible', $id_parent) ):
        while ( have_rows('layout_flexible', $id_parent) ) : the_row(); ?>

    then transferred all data.

Viewing 1 post (of 1 total)

The topic ‘How to inherit not all the content is flexible, and part of it?’ is closed to new replies.