Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Find images with TNTSearch

Started by Mirko 8 years ago · 2 replies · 713 views
8 years ago

Hello,
I am working on a modular Website using Grav CMS. I have already installed and set up the "TNTSearch"-plugin as shown in the documentation and it is working.
My customer wants to show some products on the website. Is it possible to search for products with tntsearch and find the accompanying image? At the moment, tntsearch is only looking for the indexed words. He can not find the images shown on the side.

Cheers,
Mirko

8 years ago

Hi Mirco.

As you can overwrite the result template, yes, that's possible. You can load a page using

TWIG
{% set page = page.find('some/other/page') %}

<div id="about-us">
  {{ page.content }}
</div>

and as you dispose of the necessary information, the path to the product, you can fetch all the related data like content, page.media, etc.

8 years ago

Yeah! That's it. Thank you so much! 🙂

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago