- Posts: 18
COMMUNITY FORUM
K2 to use only one image size - how to ?
- ataman79
-
Topic Author
- Offline
- New Member
Less
More
10 years 1 month ago #142158
by ataman79
K2 to use only one image size - how to ? was created by ataman79
Hi all,
is there a chance K2 to use only one image size - for ex. Large Image. I managed to do this in the category settings, but still for tag, search & date listings K2 is using the Generic image size and file. Is there a chance to change this to use the Large Image file ?
Thank you in advance
is there a chance K2 to use only one image size - for ex. Large Image. I managed to do this in the category settings, but still for tag, search & date listings K2 is using the Generic image size and file. Is there a chance to change this to use the Large Image file ?
Thank you in advance
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142179
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 to use only one image size - how to ?
It is possible if you override the tag.php, user.php and generic.php files.
Locate:
And replace the Generic part with the size you want.
More on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Locate:
<?php echo $item->imageGeneric; ?>
And replace the Generic part with the size you want.
More on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Please Log in or Create an account to join the conversation.
- ataman79
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 18
10 years 1 month ago #142264
by ataman79
Replied by ataman79 on topic K2 to use only one image size - how to ?
Hi Krikor,
thanks for your answer. I was think so, but for example I want to use the Large image size (L).
With what I must replace the imageGeneric ? What is the proper name for the Large images ?
Thank you in advance
thanks for your answer. I was think so, but for example I want to use the Large image size (L).
With what I must replace the imageGeneric ? What is the proper name for the Large images ?
Thank you in advance
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142278
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 to use only one image size - how to ?
try imageLarge.
Please Log in or Create an account to join the conversation.
- ataman79
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 18
10 years 1 month ago #142646
by ataman79
Thanks Krikor. It helps :)
But I have an interesting case, especially for the tag.php Here it is:
In my template folder -> in html->com_k2 (for overrides) I have two k2 templates. One is called default and the other is my own one (almost same as default but with small changes) Interesting is that if I change something in my template (for ex. tag.php - the file is the same in the two templates) the tag listing has no effect, but when I change the same thing in the default folder all is working great.
Do you have any idea why is that ?
Replied by ataman79 on topic K2 to use only one image size - how to ?
Krikor Boghossian wrote: try imageLarge.
Thanks Krikor. It helps :)
But I have an interesting case, especially for the tag.php Here it is:
In my template folder -> in html->com_k2 (for overrides) I have two k2 templates. One is called default and the other is my own one (almost same as default but with small changes) Interesting is that if I change something in my template (for ex. tag.php - the file is the same in the two templates) the tag listing has no effect, but when I change the same thing in the default folder all is working great.
Do you have any idea why is that ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142677
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 to use only one image size - how to ?
The default one is inherited throughout the site.
If you want to apply a different tag template you need to map this tag view into a menu item.
If you want to apply a different tag template you need to map this tag view into a menu item.
Please Log in or Create an account to join the conversation.
- ataman79
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 18
10 years 1 month ago #142705
by ataman79
Replied by ataman79 on topic K2 to use only one image size - how to ?
You mean to create new menu item - to select menu type K2-> Таgs, and then in Options for "Select a template" to choose my own K2 template right ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142711
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 to use only one image size - how to ?
Exactly :)
Please Log in or Create an account to join the conversation.
- ataman79
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 18
10 years 1 month ago #142716
by ataman79
Thanks a lot :)
Can you set the issue as Solved ?
Replied by ataman79 on topic SOLVED - K2 to use only one image size - how to ?
Krikor wrote: Exactly :)
Thanks a lot :)
Can you set the issue as Solved ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142719
by Krikor Boghossian
Replied by Krikor Boghossian on topic SOLVED - K2 to use only one image size - how to ?
You 're welcome ataman.
Please Log in or Create an account to join the conversation.