- Posts: 10
- Thank you received: 0
Thumbnail sizes
- ammer
- Topic Author
- Offline
- New Member
Less
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
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.
- admin
- Offline
- Administrator
Less
More
- Posts: 23
- Thank you received: 7
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.
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.
- ammer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
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?
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.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
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:
That will do the trick.
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.
- ammer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
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