Keyword

Different size images within one category?

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107470 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

Please Log in or Create an account to join the conversation.

More
12 years 4 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

Please Log in or Create an account to join the conversation.

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107472 by Simone
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

Please Log in or Create an account to join the conversation.

More
12 years 4 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.

Please Log in or Create an account to join the conversation.

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107474 by Simone
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

Please Log in or Create an account to join the conversation.

More
12 years 4 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
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107476 by Simone
Sorry, still isn't working... Pffff, anyone else??
Grtz, Simone

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago - 12 years 4 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

Please Log in or Create an account to join the conversation.

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago - 12 years 4 months ago #107478 by Simone
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

Please Log in or Create an account to join the conversation.

More
12 years 4 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.
Log in  or Create an account to join the conversation.

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107480 by Simone
Hi Peter,
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.

More
12 years 4 months ago #107481 by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
Are you using a gantry framework template by any chance ? you can try assigning that category to another template temporarily see if it displays. Send a link and I will have a look if you want.

Please Log in or Create an account to join the conversation.

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107482 by Simone
I'm using a template from Templaza - trekking fan. Could that be the problem then??

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #107483 by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
I just assigned the category I put the link fo the BEEZ 2 Template & it still displays the image, you have that template also I think, so if you temporarily assign that category to BEEZ 2 template you will see if it's your template causing the problem. What version Joomla do you have ?

Please Log in or Create an account to join the conversation.

  • Simone
  • Simone's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #107484 by Simone
I cannot assign 1 category to another template, I can (in K2) only choose DEFAULT....

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #107485 by Peter Grube
Replied by Peter Grube on topic Re: Different size images within one category?
I dont mean in K2, I mean in joomla, do you have link to your site ?

Please Log in or Create an account to join the conversation.