- Posts: 11
COMMUNITY FORUM
How can I remove the link on the leading image?
- Gabriele Bigatti
-
Topic Author
- Offline
- New Member
Less
More
14 years 8 months ago #88267
by Gabriele Bigatti
How can I remove the link on the leading image? was created by Gabriele Bigatti
Which file I have to modify to remove the link on the leading image of an item?Thanks for your support
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 8 months ago #88268
by william white
Replied by william white on topic How can I remove the link on the leading image?
Try creating an override and look at item.php around line 206 div itemImageBlock
Please Log in or Create an account to join the conversation.
- Gabriele Bigatti
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 11
14 years 8 months ago #88269
by Gabriele Bigatti
Replied by Gabriele Bigatti on topic How can I remove the link on the leading image?
William thanks for your reply but I don't know what an override is, sorry
I tried to remove the link from item.php but when i upload the file on my server I don't see any change
can you please explain to me what I have to do to create an override?
thanks
I tried to remove the link from item.php but when i upload the file on my server I don't see any change
can you please explain to me what I have to do to create an override?
thanks
Please Log in or Create an account to join the conversation.
- irish
-
- Offline
- Senior Member
Less
More
- Posts: 53
14 years 8 months ago #88270
by irish
Replied by irish on topic How can I remove the link on the leading image?
Hi Gabriele,
What William means by overide is create an environment so you can edit or customize files without overwriting core files and achieve your wanted end result.
simon.getk2.org/k2-documents/item/91-templating
-and-
community.getk2.org/forum/topics/k2-template-override-package
these two articles explain how to create a sub-template that allows you to overide the way k2 is displayed and functions.
Cheers!
irish
Gabriele Bigatti said:William thanks for your reply but I don't know what an override is, sorry I tried to remove the link from item.php but when i upload the file on my server I don't see any change
can you please explain to me what I have to do to create an override?
thanks
What William means by overide is create an environment so you can edit or customize files without overwriting core files and achieve your wanted end result.
simon.getk2.org/k2-documents/item/91-templating
-and-
community.getk2.org/forum/topics/k2-template-override-package
these two articles explain how to create a sub-template that allows you to overide the way k2 is displayed and functions.
Cheers!
irish
Gabriele Bigatti said:William thanks for your reply but I don't know what an override is, sorry I tried to remove the link from item.php but when i upload the file on my server I don't see any change
can you please explain to me what I have to do to create an override?
thanks
Please Log in or Create an account to join the conversation.
- Gabriele Bigatti
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 11
14 years 8 months ago #88271
by Gabriele Bigatti
Replied by Gabriele Bigatti on topic How can I remove the link on the leading image?
thanks irish
irish said:Hi Gabriele,
What William means by overide is create an environment so you can edit or customize files without overwriting core files and achieve your wanted end result.
simon.getk2.org/k2-documents/item/91-templating
-and-
community.getk2.org/forum/topics/k2-template-override-package
these two articles explain how to create a sub-template that allows you to overide the way k2 is displayed and functions.
Cheers!
irish
Gabriele Bigatti said:William thanks for your reply but I don't know what an override is, sorry I tried to remove the link from item.php but when i upload the file on my server I don't see any change
can you please explain to me what I have to do to create an override?
thanks
irish said:Hi Gabriele,
What William means by overide is create an environment so you can edit or customize files without overwriting core files and achieve your wanted end result.
simon.getk2.org/k2-documents/item/91-templating
-and-
community.getk2.org/forum/topics/k2-template-override-package
these two articles explain how to create a sub-template that allows you to overide the way k2 is displayed and functions.
Cheers!
irish
Gabriele Bigatti said:William thanks for your reply but I don't know what an override is, sorry I tried to remove the link from item.php but when i upload the file on my server I don't see any change
can you please explain to me what I have to do to create an override?
thanks
Please Log in or Create an account to join the conversation.
- Stevan van de Merkt
-
- Offline
- New Member
Less
More
- Posts: 3
13 years 8 months ago #88272
by Stevan van de Merkt
Replied by Stevan van de Merkt on topic How can I remove the link on the leading image?
Hi there,I found a solution to this.Find the code in line 115 to line 117. (file category_items.php found in /components/com_k2/templates/default/<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> and replace code with:<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
What you do is replacing the a href code and keeping the image in place (not something you want to lose).And presto. it works.Cheers and good luck coding.
What you do is replacing the a href code and keeping the image in place (not something you want to lose).And presto. it works.Cheers and good luck coding.
Please Log in or Create an account to join the conversation.