- Posts: 9
COMMUNITY FORUM
Different size images within one category?
- Simone
- Topic Author
- Offline
- New Member
Less
More
11 years 10 months ago #107470
by Simone
Different size images within one category? was created by Simone
Hello everyone,
I'm using K2 with a Templaza template and am creating a personal blog and doing fine, but....
I've created 3 categories and one homepage, off course. In every itemt I want an image to be shown, but I don't want each post to have the same size image (XS, S, M, L or XL).
So, I thought, instead of using the image K2 image uploader, I put a smaller size image directly into the content of my item. But it only shows up when I look at the item directly. When I look at the category no image is shown.... The other items in that category do show an image, but for those items I've used the image uploader...
Does anyone know how I can achieve the use of different image sizes within one category? So when I look at this item individually it looks fine, but when this item is shown when I click on the category, no image is shown....
Thanks for reading and your help!!!! :)
Regards, Simone
I'm using K2 with a Templaza template and am creating a personal blog and doing fine, but....
I've created 3 categories and one homepage, off course. In every itemt I want an image to be shown, but I don't want each post to have the same size image (XS, S, M, L or XL).
So, I thought, instead of using the image K2 image uploader, I put a smaller size image directly into the content of my item. But it only shows up when I look at the item directly. When I look at the category no image is shown.... The other items in that category do show an image, but for those items I've used the image uploader...
Does anyone know how I can achieve the use of different image sizes within one category? So when I look at this item individually it looks fine, but when this item is shown when I click on the category, no image is shown....
Thanks for reading and your help!!!! :)
Regards, Simone
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
11 years 10 months ago #107471
by william white
Replied by william white on topic Re: Different size images within one category?
You could create an extra field and put the size you wnat for that that particular item in it and use it as a test.
Then create an override.
It the code that displays item image, use the value of the extra field to change the size of the image that is displayed in the item view with if or switch statement
Then create an override.
It the code that displays item image, use the value of the extra field to change the size of the image that is displayed in the item view with if or switch statement
Please Log in or Create an account to join the conversation.
- Simone
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
11 years 9 months ago #107472
by Simone
Replied by Simone on topic Re: Different size images within one category?
Tnx William for your answer but isn't there an easier way to accomplish this? To be honest I don't understand what you mean... :blink:
So anyone any idea???
Thnx, regards, Simone
So anyone any idea???
Thnx, regards, Simone
Please Log in or Create an account to join the conversation.
- Peter Grube
- Offline
- Elite Member
Less
More
- Posts: 241
11 years 9 months ago #107473
by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
Hi Simone,
I think you can do it the way you mentioned, you just have to click the readmore button after you have added the image & the text you want to show in cat view. You may have to check in K2 parameters that the img tag is not being stripped. in cat view.
I think you can do it the way you mentioned, you just have to click the readmore button after you have added the image & the text you want to show in cat view. You may have to check in K2 parameters that the img tag is not being stripped. in cat view.
Please Log in or Create an account to join the conversation.
- Simone
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
11 years 9 months ago #107474
by Simone
Replied by Simone on topic Re: Different size images within one category?
Hi Peter,
Thanks for the reply, and I did what you said, but still there's no image in my category view, only in the item view. What can I still be doing wrong or overlooking?
Hope it can be solved, thanks again for your trouble!!
Regards, Simone
Thanks for the reply, and I did what you said, but still there's no image in my category view, only in the item view. What can I still be doing wrong or overlooking?
Hope it can be solved, thanks again for your trouble!!
Regards, Simone
Please Log in or Create an account to join the conversation.
- Peter Grube
- Offline
- Elite Member
Less
More
- Posts: 241
11 years 9 months ago #107475
by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
In the Item edit / Item view options in category listings / Set Image to Hide / I think you can still display big K2 image in in item view, just hide introtext.
Please Log in or Create an account to join the conversation.
- Simone
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
11 years 9 months ago #107476
by Simone
Replied by Simone on topic Re: Different size images within one category?
Sorry, still isn't working... Pffff, anyone else??
Grtz, Simone
Grtz, Simone
Please Log in or Create an account to join the conversation.
- Peter Grube
- Offline
- Elite Member
Less
More
- Posts: 241
11 years 9 months ago - 11 years 9 months ago #107477
by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
Hi Simone,
I am sorry your having trouble but I guarantee that method works you can see it Here
All setting are done in the Item Edit Page, just make sure k2 setting are set to not strip tags from categories
I am sorry your having trouble but I guarantee that method works you can see it Here
All setting are done in the Item Edit Page, just make sure k2 setting are set to not strip tags from categories
Please Log in or Create an account to join the conversation.
- Simone
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
11 years 9 months ago - 11 years 9 months ago #107478
by Simone
Replied by Simone on topic Re: Different size images within one category?
Ok, well, then maybe I just don't understand? :blush: I did everything you said and still it isn't working?
Your last sentence I really don't understand? :oops:
Can you maybe explain to me step by step, because I really believe that I'm overlooking something...
Hope you can help me :unsure: , thanks again.
Regards, Simone
Your last sentence I really don't understand? :oops:
Can you maybe explain to me step by step, because I really believe that I'm overlooking something...
Hope you can help me :unsure: , thanks again.
Regards, Simone
Please Log in or Create an account to join the conversation.
- Peter Grube
- Offline
- Elite Member
Less
More
- Posts: 241
11 years 9 months ago #107479
by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
No problems, maybe i didn,t explain to good.
First in K2 parameters, click on the Content Tab then scroll down to Content Cleanup - make sure Introtext HTML cleanup (tag strip) is set to - No.
And make sure Fulltext HTML cleanup (tag strip - set to No
Then go to Edit Item and add the image you want to use at the top before the text, I used the image button at the bottom of editor.
Click at the end of the part of you text you want to display in Cat view. then click enter so you start a new line, the click on the readmore button on bottom of editor.
Your code should then look something like this.
First in K2 parameters, click on the Content Tab then scroll down to Content Cleanup - make sure Introtext HTML cleanup (tag strip) is set to - No.
And make sure Fulltext HTML cleanup (tag strip - set to No
Then go to Edit Item and add the image you want to use at the top before the text, I used the image button at the bottom of editor.
Click at the end of the part of you text you want to display in Cat view. then click enter so you start a new line, the click on the readmore button on bottom of editor.
Your code should then look something like this.
Log in or Create an account to join the conversation.