- Posts: 27
COMMUNITY FORUM
Item image linked or not - your choice ;)
- Marek Wojtaszek
-
Topic Author
- Offline
- Junior Member
Less
More
14 years 5 months ago #90823
by Marek Wojtaszek
Item image linked or not - your choice ;) was created by Marek Wojtaszek
Ive added possibility to choce: item image can be link to bigger image or just image without link.
I think that it could be great to add this into next release ;)
See attachment
changed files are:
administrator/com_k2/models/category.xml
components/com_k2/templates/default/item.php
I think that it could be great to add this into next release ;)
See attachment
changed files are:
administrator/com_k2/models/category.xml
components/com_k2/templates/default/item.php
Please Log in or Create an account to join the conversation.
- Casper Voogt
-
- Offline
- Junior Member
Less
More
- Posts: 22
14 years 3 months ago #90824
by Casper Voogt
Replied by Casper Voogt on topic Item image linked or not - your choice ;)
Thank you so much for this!
I used your idea and added it to item.xml, so it is now possible to turn off the popup modal link on an item-by-item basis.
Changed files;
administrator/com_k2/models/item.xmlcomponents/com_k2/templates/default/item.php
My code in item.php is set up so items will show popup links on images by default, but if the item options have been set to disable the popup, it will not be linked.
I used your idea and added it to item.xml, so it is now possible to turn off the popup modal link on an item-by-item basis.
Changed files;
administrator/com_k2/models/item.xmlcomponents/com_k2/templates/default/item.php
My code in item.php is set up so items will show popup links on images by default, but if the item options have been set to disable the popup, it will not be linked.
Please Log in or Create an account to join the conversation.
- Marek Wojtaszek
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
14 years 3 months ago #90825
by Marek Wojtaszek
Replied by Marek Wojtaszek on topic Item image linked or not - your choice ;)
I did it in the same day but I forgot to post here ;)
Thanks for your activity.
Thanks for your activity.
Please Log in or Create an account to join the conversation.
- Casper Voogt
-
- Offline
- Junior Member
Less
More
- Posts: 22
14 years 3 months ago #90826
by Casper Voogt
Replied by Casper Voogt on topic Item image linked or not - your choice ;)
sure. Hopefully these changes will make it into the next version. Is there some place to submit code improvements? How do we let the K2 devs know about our changes?
Marek Wojtaszek said:
I did it in the same day but I forgot to post here ;)
Thanks for your activity.
Marek Wojtaszek said:
I did it in the same day but I forgot to post here ;)
Thanks for your activity.
Please Log in or Create an account to join the conversation.
- Casper Voogt
-
- Offline
- Junior Member
Less
More
- Posts: 22
14 years 1 month ago #90827
by Casper Voogt
Replied by Casper Voogt on topic Item image linked or not - your choice ;)
when you edit the K2 item, see the Item View Options and set "Image link" to Hide. The code in this post adds the Image Link option so that we can override it in the K2 template.
Please Log in or Create an account to join the conversation.
- Casper Voogt
-
- Offline
- Junior Member
Less
More
- Posts: 22
14 years 1 month ago #90828
by Casper Voogt
Replied by Casper Voogt on topic Item image linked or not - your choice ;)
Make sure to place item.php inside your K2 template directory (e.g. "default" or "somecustomtemplate").
In my case I have K2 template overrides inside /templates/myjoomlatemplate/html/com_k2/templates/myk2template/.
If you are just using the normal K2 template location, put it in /public_html/components/com_k2/templates/yourk2template/.
And clear your caches.
In my case I have K2 template overrides inside /templates/myjoomlatemplate/html/com_k2/templates/myk2template/.
If you are just using the normal K2 template location, put it in /public_html/components/com_k2/templates/yourk2template/.
And clear your caches.
Please Log in or Create an account to join the conversation.