Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.2.4, custom template
- This topic has 2 replies, 2 voices, and was last updated 7 years, 3 months ago by
Anders.
-
AuthorPosts
-
04/23/2015 at 3:34 pm #332224
Anders
ParticipantHello
I am trying to change the order of some of the fields. It seems easy to edit the card.php to change the order, but when I try to move the biography field up under address, in the frontend, all info in the other fiels ONLY show up if the biography field contains information. How to resolve? Maybe it’s just a bracket that has to be moved, but I can’t quite figure it out.
Working code:
echo '<div class="cn-right">'; if ( $atts['show_title'] )$entry->getTitleBlock(); if ( $atts['show_org'] ) $entry->getOrgUnitBlock(); if ( $atts['show_contact_name'] )$entry->getContactNameBlock( array( 'format' => $atts['contact_name_format'] , 'label' => $atts['str_contact'] ) ); if ( $atts['show_family'] )$entry->getFamilyMemberBlock(); if ( $atts['show_addresses'] ) $entry->getAddressBlock( array( 'format' => $atts['addr_format'] , 'type' => $atts['address_types'] ) ); if ( $atts['show_phone_numbers'] ) $entry->getPhoneNumberBlock( array( 'format' => $atts['phone_format'] , 'type' => $atts['phone_types'] ) ); if ( $atts['show_email'] ) $entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) ); if ( $atts['show_dates'] ) $entry->getDateBlock( array( 'format' => $atts['date_format'], 'type' => $atts['date_types'] ) ); if ( $atts['show_links'] ) $entry->getLinkBlock( array( 'format' => $atts['link_format'], 'type' => $atts['link_types'] ) ); if ( $atts['show_im'] ) echo $entry->getImBlock(); if ( $atts['show_social_media'] ) echo $entry->getSocialMediaBlock(); $entry->getContentBlock( $atts['content'], $atts, $template ); if ( $atts['enable_bio'] && $entry->getBio() != '' ) { echo '<div class="cn-bio" id="cn-bio-' , $uuid , '">'; if ( $atts['enable_bio_head'] ) echo '<h5>' , $atts['str_bio_head'] , '</h5>'; echo $entry->getBioBlock(); echo '</div>'; } if ( $atts['enable_note'] && $entry->getNotes() != '' ) { echo '<div class="cn-notes" id="cn-bio-' , $uuid , '">'; if ( $atts['enable_note_head'] ) echo '<h5>' , $atts['str_note_head'] , '</h5>'; echo $entry->getNotesBlock(); echo '</div>'; }
Code not working:
echo '<div class="cn-right">'; if ( $atts['show_title'] )$entry->getTitleBlock(); if ( $atts['show_org'] ) $entry->getOrgUnitBlock(); if ( $atts['show_contact_name'] )$entry->getContactNameBlock( array( 'format' => $atts['contact_name_format'] , 'label' => $atts['str_contact'] ) ); if ( $atts['show_family'] )$entry->getFamilyMemberBlock(); if ( $atts['enable_bio'] && $entry->getBio() != '' ) { echo '<div class="cn-bio" id="cn-bio-' , $uuid , '">'; if ( $atts['enable_bio_head'] ) echo '<h5>' , $atts['str_bio_head'] , '</h5>'; echo $entry->getBioBlock(); if ( $atts['show_addresses'] ) $entry->getAddressBlock( array( 'format' => $atts['addr_format'] , 'type' => $atts['address_types'] ) ); if ( $atts['show_phone_numbers'] ) $entry->getPhoneNumberBlock( array( 'format' => $atts['phone_format'] , 'type' => $atts['phone_types'] ) ); if ( $atts['show_email'] ) $entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) ); if ( $atts['show_dates'] ) $entry->getDateBlock( array( 'format' => $atts['date_format'], 'type' => $atts['date_types'] ) ); if ( $atts['show_links'] ) $entry->getLinkBlock( array( 'format' => $atts['link_format'], 'type' => $atts['link_types'] ) ); if ( $atts['show_im'] ) echo $entry->getImBlock(); if ( $atts['show_social_media'] ) echo $entry->getSocialMediaBlock(); $entry->getContentBlock( $atts['content'], $atts, $template ); echo '</div>'; }
04/24/2015 at 3:11 pm #332357Steven Zahm
Keymaster@ boerup
It is this line:
if ( $atts['enable_bio'] && $entry->getBio() != '' ) {
You need to move the corresponding
}
to after this line:echo $entry->getBioBlock();
04/27/2015 at 2:43 pm #332610Anders
ParticipantOh my, I must have been tired when trying to move it. Sorry….All is good…
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.