• How would you go about using this within an ACF Flexible Content Layout?

    I’d like to make it part of the site page panel library?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lindseyleannej

    (@lindseyleannej)

    Sorry to further specify, here’s the code I”m looking at… essentially I’m trying to allow a custom field for the Table Title and Subtitle to Appear (as well as a little flyout menu). I’ve set variables above, but wasn’t sure how to call them correctly. Really appreciate any insight!

    <section id="section__table" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
    <?php 
    $table = $section['table'];
    $title = $section['title'];
    $subtitle = $section['subtitle'];
    
    if ( $table ) {
    
        echo '<table border="0" class="mdl-data-table mdl-js-data-table">';
    
            if ( $table['header'] ) {
    
                echo '<thead>
                <aside id="section__table--content" class="wrapper">
                  <h2>Title</h2>
                  <h5>Subtitle</h5>
       
    
                  <button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="btn1">
                    <i class="material-icons">more_vert</i>
                  </button>
    
                  <ul class="mdl-menu mdl-js-menu mdl-menu--bottom-right" for="btn1">
                    <li class="mdl-menu__item">Lorem</li>
                    <li class="mdl-menu__item" disabled>Ipsum</li>
                    <li class="mdl-menu__item">Dolor</li>
                  </ul>
    
                </div>
                </aside>';
    
                    echo '<tr>';
    
                        foreach ( $table['header'] as $th ) {
    
                            echo '<th>';
                                echo $th['c'];
                            echo '</th>';
                        }
    
                    echo '</tr>';
    
                echo '</thead>';
            }
    
            echo '<tbody>';
    Thread Starter lindseyleannej

    (@lindseyleannej)

    I also need to turn the

      within that into a Repeater field
    Thread Starter lindseyleannej

    (@lindseyleannej)

    We’ve figured out the solution to this, thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Table as Layout Within Flexible Content’ is closed to new replies.