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>';