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.
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.
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.1.5, entry, getImage(), permalink, Tile Plus
- This topic has 5 replies, 3 voices, and was last updated 8 years, 1 month ago by Steven Zahm.
10/29/2014 at 12:29 am #308410Lingbo LiParticipant
I’ve created a page listing real estate agents: http://leadingedgeagents.com/about-us/agents/
How do I edit the template so that I can click the headshot to go to an individual agent’s page? I tried figuring this out myself using the card php file, but couldn’t figure it out. Any help would be really appreciated. Thanks so much.10/29/2014 at 9:18 am #308417
@ Lingbo Li
Very nice! The monotone style looks great!
Unfortunately I do not have a simple way to get a permalink to an entry page. A rather glaring oversight really. Here’s what can be done, add this to your template:
$anchor = cnURL::permalink( array( 'type' => $atts['target'], 'slug' => $entry->getSlug(), 'title' => $entry->getName( $atts ), 'text' => $out, 'home_id' => $entry->directoryHome['page_id'], 'force_home' => $entry->directoryHome['force_home'], 'return' => TRUE, ) ); preg_match( '/href="(.*?)"/', $anchor, $matches ); $url = $matches;
You should now be able to wrap the
$entry->getImage(...)call in the template with an anchor tag using
I know this does not help you now, but I’ll be adding a simple way to grab the entry permalink in the next release.
Hope that helps!10/29/2014 at 10:21 am #308427Lingbo LiParticipant
Thanks for the speedy reply! I implemented it on the page I linked you to before, but it is returning the directory page (/agents) and not the individual agent’s URL (/agents/name/sven-anderson).
Here’s what my code looks like:
Any ideas? Thanks!10/29/2014 at 10:55 am #308434
@ Lingbo Li
Sorry, I did have a typo! I commented the gist with the correction.
If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
https://wordpress.org/support/view/plugin-reviews/connections04/09/2015 at 8:50 am #331027JasonGuest
We would like to link the image also.
Have you created a simpler method to this?04/09/2015 at 11:44 am #331057
There is a new helper function, I just update the gist to show the useage. Hope that helps!
You cannot reply to this support topic. Please open your own support topic.