Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Is it possible to display an image in the couch search results?

As an example by adding in something like: <cms:show k_search_product_image />

Thanks.
#1
Can you please share your code?
It is doable.

If you read here:
Search

Given a single word or several words, Couch supports searching for them through all the defined editable regions of your templates (and a few of the system fields - namely the title and name fields) and give back all the pages that contain these words.


So basically if you have an editable region defined for the image then you can use <cms:show image_editable_name /> to display the image inside the <cms:search> tag.

For a better understanding you can also use the <cms:dump /> tag inside the <cms:search> tag. like:

Code: Select all
<cms:search_form />

<cms:search masterpage='template_name.php' limit='10' >
    <cms:dump />
</cms:search>


This will help you see what all variables are available to you.

#2
You can also see this post on Filtered Search. This can also be useful to you I suppose.

As an example by adding in something like: <cms:show k_search_product_image />

Looking at your query i suppose you are working on CouchCart! There are a lot of posts available in the forum for the same too.

Regards,
GXCPL
Image
where innovation meets technology
Thanks a million for the reply.
Thanks for the guidance. It is working.

Code inside the<cms:search tag;

<img src="<cms:show product_main_image />" alt="<cms:show k_search_title />" >

</cms:search>
@Silvercoza,

I am glad your query is sorted. Happy to help!

Regards,
GXCPL
Image
where innovation meets technology
Updated to:
[SOLVED] Display product image in search result.
6 posts Page 1 of 1
cron