- Posts: 2
COMMUNITY FORUM
Custom link with item image in category item view?
- Milos Stamatovic
-
Topic Author
- Offline
- New Member
Less
More
7 years 11 months ago #61276
by Milos Stamatovic
Milos Stamatovic created the topic: Custom link with item image in category item view?
Usually, in category item view, image links to item.
Is there a way to link item image with external URL?
i`ve tried adding a custom extra field called "link", and then editing category_item.php, so the URL would become link extra field value...
I`m very weak with php, so I didn`t succeed...
Is there a simpler way (with some plugin), or can anybody help me with php?
Is there a way to link item image with external URL?
i`ve tried adding a custom extra field called "link", and then editing category_item.php, so the URL would become link extra field value...
I`m very weak with php, so I didn`t succeed...
Is there a simpler way (with some plugin), or can anybody help me with php?
Please Log in or Create an account to join the conversation.
- Jakub Jedynak
-
- Offline
- Senior Member
Less
More
- Posts: 56
7 years 11 months ago - 7 years 10 months ago #61277
by Jakub Jedynak
Jakub Jedynak replied the topic: Re: Custom link with item image in category item view?
Not without changing code in k3 K2 ( ;) ) template for category view item. Search on forum for info about 'overides' and I'm afraid you need to learn some PHP basics.
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
-
- Offline
- Platinum Member
- Aham Brahmasmi
7 years 11 months ago #61278
by Kannan Naidu Venugopal
K2 Rocks \m/
Kannan Naidu Venugopal replied the topic: Re: Custom link with item image in category item view?
K3???? :D
Milos:
Another option is to use the image in the article body as introtext. Then you can link the image to an external url.
Milos:
Another option is to use the image in the article body as introtext. Then you can link the image to an external url.
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- Milos Stamatovic
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
7 years 10 months ago #61279
by Milos Stamatovic
Milos Stamatovic replied the topic: Re: Custom link with item image in category item view?
Thank to both of you. I will do my best and inform you about results.
Please Log in or Create an account to join the conversation.
- Dejan Bojovic
-
- Offline
- New Member
Less
More
- Posts: 2
4 months 2 weeks ago #172587
by Dejan Bojovic
Dejan Bojovic replied the topic: Re: Custom link with item image in category item view?
It's been a long time, but did any solution appear?
Please Log in or Create an account to join the conversation.
- Florence3J
-
- Offline
- New Member
Less
More
- Posts: 1
4 months 2 weeks ago - 4 months 2 weeks ago #172594
by Florence3J
Florence3J replied the topic: Custom link with item image in category item view?
I can get an category-image-id item to show up for each category object in the JSON, but its value is 0
TellDunkin
.
Last edit: 4 months 2 weeks ago by Florence3J.
Please Log in or Create an account to join the conversation.
- Fotis
-
- Away
- Administrator
- JoomlaWorks Support Team
4 months 2 weeks ago #172625
by Fotis
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
Fotis replied the topic: Custom link with item image in category item view?
The solution is rather simple.
Create an extra field to use for the custom link.
Then do some category_item.php and item.php overriding and change existing links to utilize the extra field URL.
Here's how you display/call a single extra field: getk2.org/documentation/tips-a-tricks/2667-display-single-extra-fields-anywhere-in-your-k2-content
Create an extra field to use for the custom link.
Then do some category_item.php and item.php overriding and change existing links to utilize the extra field URL.
Here's how you display/call a single extra field: getk2.org/documentation/tips-a-tricks/2667-display-single-extra-fields-anywhere-in-your-k2-content
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.