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.
- This topic has 9 replies, 2 voices, and was last updated 8 years, 6 months ago by
Steven Zahm.
-
AuthorPosts
-
01/17/2018 at 3:13 pm #447707
Travis Halff
ParticipantHello,
My client will be using the Organization field to add the degrees of the people in the database. They would like to have the option for forced multiple lines for those with multiple degrees. Ex:
Master of Business Administration, Trinity University
Master of Economics, University of Texas at AustinIs this possible? HTML doesn’t seem to be accepted in those fields.
01/17/2018 at 4:26 pm #447721Steven Zahm
Keymaster@ Travis
The only way to accomplish this would be to edit the template. You could edit the template, splitting the title string on the demiliter (the comma).
Hope this helps, let me know.
01/22/2018 at 1:06 pm #448372Travis Halff
ParticipantThanks for the response. Would you mind letting me know how to split the title string on the demiliter? I would greatly appreciate it.
01/22/2018 at 1:18 pm #448373Steven Zahm
Keymaster@ Travis
You would use the PHP explode() to convert the string to an array then implode() back to a string. function in the template file.
Something like this:
$bits = explode( '|', $entry->getOrganization() );
echo implode( '<br>', $bits);01/22/2018 at 1:29 pm #448375Travis Halff
ParticipantGreat, I will give it a try. I am using the C-Map template. Is this the file I would add it under?
connections-cmap/cmap.php
If so, under which area?
01/23/2018 at 12:56 pm #448507Steven Zahm
Keymaster@ Travis
Yes, that is the correct file. You would remove the code relating to the org and department near the top of the file and replace it with my example code. The you would tweak to suit.
Hope that helps!
01/25/2018 at 9:48 am #448737Travis Halff
ParticipantIf you could check that link– I think I identified the code to replace. It would be the org line there correct?
Sorry for being overcautious, I know PHP errors can really mess up a WP site so trying to be extra careful.
01/25/2018 at 10:05 am #448740Steven Zahm
Keymaster@ Travis
Opps, I did point you to the wrong file. Apologies, it is these files you want to edit.
- connections-cmap/card.php
- connections-cmap/card-single.php
It’ll probably make more sense on what you need to edit now. Again sorry about that.
Also, you should take a look at this tutorial on custom template override files so your changes are not lost during a plugin update. I’d only worry about this after you’ve successfully made the change.
01/25/2018 at 10:38 am #448745Travis Halff
ParticipantFound the code! Where would your string go in the context of this snippet? Thank you so much for holding my hand through this process, PHP is NOT my strong suit.
if ( $atts['show_org'] || $atts['show_dept'] ) { $entry->getOrgUnitBlock( array( 'show_org' => $atts['show_org'], 'show_dept' => $atts['show_dept'], ) );01/26/2018 at 9:39 am #448814Steven Zahm
Keymaster@ Travis
Replace these lines with the demo code I gave you:
$entry->getOrgUnitBlock( array( 'show_org' => $atts['show_org'], 'show_dept' => $atts['show_dept'], ) );Make sure it is within the
ifstatement brackets,{and}. -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
