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.5.29, cMap, feature request, permalink, template
- This topic has 1 reply, 2 voices, and was last updated 9 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
11/13/2016 at 10:05 pm #399751
Linda Moore
ParticipantUsing cMap template…Instead of displaying the connections bio page for the name link, I’d like to instead direct to an outside page. I noticed that you responded to this question posted for a different template that it may be possible to modify some code to make this work. I’d like to give it a try if you can tell me what to change.
Thanks!11/14/2016 at 4:53 pm #399828Steven Zahm
Keymaster@ Linda
The name link is reserved for linking directly to the profile page, as you know. Changing this will require editing the
card.phpfile found in this folder for cMap:../wp-content/plugins/connections-cmap/You need to look for this line.
<h3><?php $entry->getNameBlock( array( 'format' => $atts['name_format'], 'link' => $atts['link'] ) ); ?></h3>The first change you need to make is this:
<h3><?php $entry->getNameBlock( array( 'format' => $atts['name_format'], 'link' => FALSE ) ); ?></h3>After this, it gets hard (depending on your skill with PHP). YOu need to decide if you want to save this link as a Link field type (a standard field in Connections) or a custom field.
I think I would suggest a custom field. Here’s a link to a tutorial on how to add a text field custom field.
Instead of displaying the custom field you would save the value (the URL) into a variable to be used has the
hrefattribute in the link. Something like this:$url = $entry->getMeta( array( 'key' => 'field_id', // This should match exactly the field id used when registering the custom field. 'single' => TRUE // Do not change this. ) );Then you would change the name block to something like this:
<h3><a href="<?php echo esc_url( $url ); ?>"><?php $entry->getNameBlock( array( 'format' => $atts['name_format'], 'link' => FALSE ) ); ?></a></h3>This is all untested but it should get you started along the right path.
Hope this helps!
ps. If you are going to alter the template file, you should review this tutorial on custom template override files.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
