- Posts: 9
COMMUNITY FORUM
Different size images within one category?
- Simone
-
Topic Author
- Offline
- New Member
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
- Posts: 3722
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
- Posts: 9
So anyone any idea???
Thnx, regards, Simone
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
- Posts: 241
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
- Posts: 9
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
- Posts: 241
Please Log in or Create an account to join the conversation.
- Simone
-
Topic Author
- Offline
- New Member
- Posts: 9
Grtz, Simone
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
- Posts: 241
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
- Posts: 9
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
- Posts: 241
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.
- Simone
-
Topic Author
- Offline
- New Member
- Posts: 9
Thanks again, did everything you said - my input looks like this:
<p><img src="images/dkny%20sequin%20dress.png" border="0" style="border: 0; margin-left: 10px; margin-right: 10px; float: left;" /></p>
<p>Elke vrijdag shop je bij 'designer outlet heaven' the OUTNET de mooiste items uit één thema met 30% extra korting. Vandaag is dat 'The Downtown Look'. Hier vind je bijvoorbeeld dit geweldige feestjurkje van DKNY met gouden pailletten.</p>
<hr id="system-readmore" />
<p>Originele retailprijs € 345,-, bij the OUTNET voor € 155,-, vandaag dus voor maar € 108,50. Helemaal ge-wel-dig voor de feestdagen en Oud en Nieuw toch?? Wees er snel bij want voor je het weet is je maat uitverkocht...</p>
But still no image in the category view.... What can I be overlooking? Is it the template? Can it be..??
I really don't know...
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
- Posts: 241
Please Log in or Create an account to join the conversation.
- Simone
-
Topic Author
- Offline
- New Member
- Posts: 9
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
- Posts: 241
Please Log in or Create an account to join the conversation.
- Simone
-
Topic Author
- Offline
- New Member
- Posts: 9
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
- Posts: 241
Please Log in or Create an account to join the conversation.