Lucidworks Fusion 5.4 introduces a new feature to make using Predictive Merchandiser templates even more useful: configurable template types. Template types were implicitly used in previous releases with landing pages, type-ahead, and product detail pages. Now you can create your own template types to cover even more use cases for your site.

Predictive Merchandiser templates allow you to configure different zones of a page to trigger based on your search context. So if you want to trigger a spotlight of products on certain category landing pages, a landing template can be created with a trigger condition set for the category you choose. All of the zones you configure and their respective results can be returned from the templating service with one API call.

Template types act as an optional parameter you can pass to the templating API when rendering pages. By default, it’s set to trigger landing pages. Merchandisers can define new template types, such as homepage, support, or manuals.

You can see these new template types in the template manager navigation. Each template is nested underneath its assigned template type.

Predictive Merchandiser template manager.

 

Template types are set when you create a new template. The dialog suggests all types that have already been created.

Predictive Merchandiser new template page.

 

But you aren’t limited to those options. You can put in your own new template type and it will be added to the options and to the template manager navigation. Just make sure your front-end has been configured to support any new template types you enter!

Adding new template to Predictive Merchandiser.

 

Back on the Merchandiser screen, you can switch your template type by starting a task and then selecting a new type from the dropdown menu. Once you switch template types, any searches or filter selections you make will only meet trigger conditions for templates in that type.

Searching new templates in Predictive Merchandiser navigation.

 

Once the template types are created, the front-end code that calls the Predictive Merchandiser templating API just needs to know about the types. When these new types need to be triggered from the front-end, the call to templating passes in the templateTypes parameter with the allowed types. For example, if you have an “faq” template type, the request would include templateTypes=faq.

About Tom Allen

Read more from this author

LEARN MORE

Contact us today to learn how Lucidworks can help your team create powerful search and discovery applications for your customers and employees.