JSLink and Display Templates Part 7 – Code Samples
- Part 1 – Overview, URL Tokens and Applying JSLink to objects
- Part 2 – Changing how individual fields display
- Part 3 – Creating a custom editing interface
- Part 4 – Validating user input
- Part 5 – Creating custom List Views
- Part 6 – Creating View Templates and Deployment Options
- Part 7 – Code Samples (this post)
When I was speaking at the SharePoint Evolutions conference earlier this year I ran into Jeremy Thake (@JThake) and Vesa Juvonen (@vesajuvonen) and they saw the JSLink samples I was running through for the session I had.
Well .. one thing led to another as they say .. and by the time the conference finished I had refactored all of my code and uploaded it to the OfficeDev PnP (Patterns and Practices) GitHub repository.
So you can find all of my sample code in the “Branding.JSLink” section (OfficeDev PnP > Samples > Branding.JSLink).
This includes full documentation, full source code, a compiled deployable WSP package, as well as loads and loads of awesome stuff from the rest of the OfficeDev PnP contributors.
The sample code includes:
- Re-Render Lookups as bulleted lists and checkboxes
- Cascading Drop-Downs for Lookup Fields
- Cascading Drop-Downs for Managed Metadata Fields
- Google Maps integration (allowing both pin-point and shape selection)
- Sample colour picker
And here are some tasty screenshots to get you in the mood!
Hope you enjoyed the series (sorry it took so long!)