- Posts: 2
COMMUNITY FORUM
Custom link with item image in category item view?
- Milos Stamatovic
- Topic Author
- Offline
- New Member
Less
More
12 years 10 months ago #61276
by Milos Stamatovic
Custom link with item image in category item view? was created by Milos Stamatovic
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
12 years 10 months ago - 12 years 9 months ago #61277
by Jakub Jedynak
Replied by Jakub Jedynak on 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
12 years 10 months ago #61278
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on 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
12 years 10 months ago #61279
by Milos Stamatovic
Replied by Milos Stamatovic on 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: 17
5 years 4 months ago #172587
by Dejan Bojovic
Replied by Dejan Bojovic on 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
5 years 4 months ago - 5 years 4 months ago #172594
by Florence3J
Replied by Florence3J on 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: 5 years 4 months ago by Florence3J.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Online
- Admin
Less
More
- Posts: 6218
5 years 4 months ago #172625
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on 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
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.