Keyword

change the link in the title of an item

  • steven
  • steven's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113972 by steven
hi all,
i am creating my new website. on a page I have several articles and I would like that when one clicks on the title of an item (which is a link) that the link will not point to the item's page but to an other (chosen) page.

does anybody know how to do this?

thank you for any help

Steven

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 4 months ago #113973 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: change the link in the title of an item
Hi Steven,

How the other page will be determined or know?

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

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

  • steven
  • steven's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113974 by steven
Replied by steven on topic Re: change the link in the title of an item
hi Mohamed,

thanks for your reply. yes the page is known in advanced. Idealy, tere would be an extra field where I could set the url of the link for the title.

Steven

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago - 11 years 4 months ago #113975 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: change the link in the title of an item
You should override category_item.php. Remember to set a text extrafield and not a link one if you do not want to use a regex or str_replace to clean up the link.

Then locate the part of the title and remove the value of the <a href="" > element.

Finally you need to render your extrafield there. This post will show you how.

Remember you need at least K2 v.2.6.2

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

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

  • steven
  • steven's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113976 by steven
Replied by steven on topic Re: change the link in the title of an item
great, thanks.

ill try this out now :-)

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


Powered by Kunena Forum