All samples and documentation I've red about JSLink shows that the field name must be known in the script file (ex: https://github.com/SharePoint/PnP/blob/master/Samples/Branding.JSLink/Branding.JSLink.NCSS/Style%20Library/OfficeDevPnP/Branding.JSLink/TemplateOverrides/FavouriteColours.js)
It's ok when the jslink is dedicated to a specific field or list, but what about if a common behavior may be plugged to any field ? Especially if I want to add a common behavior to a field itself.
Should I put logic in separated files and a set of jslink to plumb the logic (with hard coded jslink names) ?
Is there a way to know which is the field where the jslink file is registered ?