Highlight Variables Using Handlebars in SuiteCommerce Templates   

in , November 25th, 2024
white and silver computer keyboard

This short tutorial article covers how to highlight variables using handlebars in SuiteCommerce Templates. In the simple code example below, a developer can highlight portions of a string dynamically using the “highlightKeyword” handlebar. This simplifies the code a ton for this use case.

"highlightKeyword" Handlebar Code Sample

<p>     
  
</p>

How the Code Renders

The above code would render as follows:

For “text” = “example text”

And “keyword” = “text”

would render as: “example text” 

This is very useful when implementing things like an input filter.

 Author: Sam Gagliardi


Got stuck on a step in this article?

We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article!

Oracle NetSuite Alliance Partner & Commerce Partner

If you have questions about how our team can support your business as you implement NetSuite or SuiteCommerce, feel free to contact us anytime. Anchor Group is a certified Oracle NetSuite Alliance Partner and Commerce Partner equipped to handle all kinds of NetSuite and SuiteCommerce projects, large or small!

 
 

Want to keep learning?

Our team of NetSuite professionals has written articles on a wide variety of NetSuite topics, from SuiteCommerce tips, to recommended NetSuite solutions, to available support services, and more! 

Your cart