01/15/2016 at 11:41 am
#361350
Participant
Steve,
That both worked and did not work. It worked for these tabs: Email; and Messages. It did not work for these tabs: Social Media; Addresses; Phone; Dates; and Categories.
Here is the code that is working:
<?php
echo '<hr class="thin" />';
echo '<ul class="tabs">';
echo '';
echo '<input type="radio" name="tabs" id="tab1" checked>';
echo '<label for="tab1">Links</label>';
echo '<div id="tab-content1" class="tab-content animated fadeIn">';
if ( $atts['show_links'] );
$entry->getLinkBlock( array( 'format' => $atts['link_format'], 'type' => $atts['link_types'] ) );
echo '</div>';
echo ' ';
echo '';
echo '<input type="radio" name="tabs" id="tab2">';
echo '<label for="tab2">Social Media</label>';
echo '<div id="tab-content2" class="tab-content animated fadeIn">';
if ( $atts['show_social_media'] )
$entry->getSocialMediaBlock();
echo '</div>';
echo ' ';
echo '';
echo '<input type="radio" name="tabs" id="tab3">';
echo '<label for="tab3">Addresses</label>';
echo '<div id="tab-content3" class="tab-content animated fadeIn">';
if ( $atts['show_addresses'] ) echo '<div class="four-columns">' ,
$entry->getAddressBlock( array( 'format' => $atts['addr_format'] , 'type' => $atts[''] ) ) , '</div>';
echo '</div>';
echo ' ';
echo '';
echo '<input type="radio" name="tabs" id="tab4">';
echo '<label for="tab4">Phone</label>';
echo '<div id="tab-content4" class="tab-content animated fadeIn">';
if ( $atts['show_phone_numbers'] ) echo
$entry->getPhoneNumberBlock( array( 'format' => $atts['phone_format'] , 'type' => $atts['phone_types'] ) );
echo '</div>';
echo ' ';
if ($atts['show_email'] !== '') {
if ( $entry->getEmailAddresses() ) {
echo '';
echo '<input type="radio" name="tabs" id="tab5">';
echo '<label for="tab5">Email</label>';
echo '<div id="tab-content5" class="tab-content animated fadeIn">';
if ( $atts['show_email'] ) echo
$entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) );
echo '</div>';
echo ' ';
}
}
if ($atts['show_im'] !== '') {
if ( $entry->getImBlock() ) {
echo '';
echo '<input type="radio" name="tabs" id="tab6">';
echo '<label for="tab6">Messenger</label>';
echo '<div id="tab-content6" class="tab-content animated fadeIn">';
if ( $atts['show_im'] ) echo $entry->getImBlock();
echo '</div>';
echo ' ';
}
}
echo '';
echo '<input type="radio" name="tabs" id="tab7">';
echo '<label for="tab7">Dates</label>';
echo '<div id="tab-content7" class="tab-content animated fadeIn">';
if ( $atts['show_dates'] ) echo
$entry->getDateBlock( array( 'format' => $atts['date_format'], 'type' => $atts['date_types'] ) );
echo '</div>';
echo ' ';
echo '';
echo '<input type="radio" name="tabs" id="tab8">';
echo '<label for="tab8">Categories</label>';
echo '<div id="tab-content8" class="tab-content animated fadeIn">';
if ( $atts['show_categories'] )
echo cn_display_terms_of_parent_term_id( 35, $entry->getCategory() );
echo '</div>';
echo ' ';
echo '';
?>
I have no idea why some tabs work and others do not.
Thanks,
George
