matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
435 stars 68 forks source link

Template code re-use: _id and _originalId #494

Closed bflorea closed 8 years ago

bflorea commented 8 years ago

In one of my projects I used the old version of EasySearch and I could use the search results as drop-in replacements for the collection documents, using the same templates to display the results. Now, that the new version uses _originalId, the templates that used to work both with search results and collection documents do not work anymore because of this change.

What is the recommended recipe for re-using the same templates to work both on collection documents and on search results?

matteodem commented 8 years ago

Probably using a template helper called getId that just checks if _originalId is around and uses that instead of _id.