Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handlebar helper to get custom field value #1476

Closed
LordZardeck opened this issue Apr 10, 2019 · 2 comments
Closed

Add handlebar helper to get custom field value #1476

LordZardeck opened this issue Apr 10, 2019 · 2 comments

Comments

@LordZardeck
Copy link

Currently in the context, custom fields are an array of objects. This makes it not possible to cleanly get a specific field value by name. In the template you'd have to loop over the array, and only print the value if the name matches what you want. It would be nice if there was some kind of helper like {{customField 'my_field_name'}}, or even a more generic {{valueFromObjectArray 'name' 'my_field_name' product.custom_fields}}

@ghost
Copy link

ghost commented Apr 10, 2019

@LordZardeck Thanks for bringing it up. We will work on implanting this feature. I opened an issue in the relevant repo: bigcommerce/paper-handlebars#33

@ghost
Copy link

ghost commented Apr 10, 2019

Since we moved this issue to paper-handlebars I'm closing that issue.

@ghost ghost closed this as completed Apr 10, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant