Keyword

K2 author link point to contact component

  • Gianluca Pantaleo
  • Gianluca Pantaleo's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 2 days ago - 2 weeks 2 days ago #171391 by Gianluca Pantaleo
Gianluca Pantaleo created the topic: K2 author link point to contact component
Hi,
I have an old Joomla 2.5 site with K2 version 2.9.0
I have activated to show the author's name in K2's articles but I would like to click on the author's name to reach his contact page (the one created with the contact component where the contact is connected to the user / author).

Currently my K2 item.php file presents this string:
<a rel="author" href="<?php echo $this-> item-> author-> link;?> "> <? php echo $ this-> item-> author-> name; ?> </a>

but I would like you to focus on this type of link:
index.php?option=com_contact&view=contact&id=*
where * is the contact id, I'm not familiar with php and I do not know how to write the correct syntax.

Can someone help me, please?
Thank you
Last Edit: 2 weeks 2 days ago by Gianluca Pantaleo.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 2 days ago #171395 by Fotis
Fotis replied the topic: K2 author link point to contact component
There is no quick/easy way. You would have to query the contacts table in your database to get the contact form that corresponds to a given user id. It's really out of the scope of the support we provide for K2.

The other option is to leave each user link pointing to the user's K2 page/profile and then add a plain ol' HTML link in their profile that points to their contact page.

Or search for a plugin that adds a contact form automatically in each K2 user/profile page (either in the Joomla Extensions Directory or in getk2.org/extend/extensions ).


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Moderators: william white