Keyword

K2 author link point to contact component

  • Gianluca Pantaleo
  • Gianluca Pantaleo's Avatar Topic Author
  • Offline
  • New Member
More
5 years 1 month ago - 5 years 1 month ago #171391 by Gianluca Pantaleo
K2 author link point to contact component was created by Gianluca Pantaleo
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: 5 years 1 month ago by Gianluca Pantaleo.

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

More
5 years 1 month ago #171395 by JoomlaWorks
Replied by JoomlaWorks on 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).

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum