Thumbnail sizes

More
12 years 1 month ago #1048 by ammer
Thumbnail sizes was created by ammer
Hi
I have two CP search modules on my site and I need to set different sizes of thumbanils in their search results. Is there a way to do that?

Thank You

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

More
12 years 1 month ago #1049 by admin
Replied by admin on topic Re: Thumbnail sizes
Thumbnail images size is set at component level. Modules has no influence on that.
However you could create an alternative output template for search results, with hardcoded custom image sizes.

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

More
12 years 1 month ago #1050 by ammer
Replied by ammer on topic Re: Thumbnail sizes
Thanks for answer.
I am familiar with altenative template, but can You tell me how to hardcode thumbnail size?

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

More
12 years 1 month ago #1051 by andrea_4g
Replied by andrea_4g on topic Re: Thumbnail sizes
In your alternative template, at the beginning of file right after variables init code, add:
Code:
$params->set('thumb_width', 200); $params->set('thumb_height', 200); $params->set('keep_aspect', 0); //optional, you might want to keep component's default

That will do the trick.
The following user(s) said Thank You: ammer

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

More
12 years 1 month ago #1052 by ammer
Replied by ammer on topic Re: Thumbnail sizes
It works, thank you for help.

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

Time to create page: 0.354 seconds