SlideShare a Scribd company logo
What the heck is a Umbraco property
      editor value converter?




      Jeavon Leopold - Twitter: @crumpled_jeavon
      e: jeavon@crumpled-dog.com www.crumpled-dog.com
What the heck?
     What is a data type property editor?
     • Property editors are the actual editors that are rendered to the content editors, implemented using
       AbstractDataEditor or IUsercontrolDataEditor
     • Data types (stored in DB) implement a selected property editor (coded in C#)
     • Content values are stored as a string in prevalue(s) (often as CSV, Json or XML)




     So what is a property editor value converter?
     • Introduced in Umbraco v4.10
     • Applies to MVC razor rendering only
       (there is a similar mechanism for razor macros called Razor Model Binding)
     • Converts the stored content value string to some other type e.g IPublishedContent
     • Can be included with a property editor (especially if property editor is a package)




10/04/2013                                                                                                   You are on page 2
How is this useful?
     How many times have you had to split in Razor to use MNTP?
     • My version for Razor Macros:




     • In MVC (using dynamics), a little better, maybe 




10/04/2013                                                        You are on page 3
How is this useful?
     • In MVC (typed), definitely no better 




                                                         Pretty complicated for a front end developer
                                                         trying to do some basic Razor templating?


     With a property editor value converter implemented on MNTP (using dynamics)
     Definitely better 




                                                         Complicated now?


     •       Doesn’t matter if XML or CSV storage type used by MNTP, the converter takes care of it
     •       Implemented in both Typed and Dynamics




10/04/2013                                                                                              You are on page 4
How to implement a converter?
      Implement IPropertyEditorValueConverter
      • Found in Umbraco.Core.PropertyEditors namespace
      • Two methods: IsConverterFor & ConvertPropertyValue
      • Use UmbracoHelper if it helps
      Example converter for Content Picker




10/04/2013                                                   You are on page 5
Quick demo
      •   Fresh Umbraco v6.0.3 using NuGet
      •   Install Standard Website MVC
      •   Build MNTP Property editor value converter
      •   Copy dll into solution
      •   Update the Razor slideshow




10/04/2013                                             You are on page 6
More?
     Umbraco Core Property Editor Converter Package (Umbraco v6 only)
     •  Implements converters for Umbraco Core property editors
     •  Will hopefully be merged in Umbraco pre v7
     •  http://our.umbraco.org/projects/developer-tools/umbraco-core-property-editor-converters
     •  Check out the source code https://bitbucket.org/jeavon/umbraco-core-property-editor-converters
     •  Helper method WIP – provides access to the data type settings so that you can alter the return type
        depending on the settings

     Documentation
     •   http://our.umbraco.org/documentation/Extending-Umbraco/Property-
         Editors/PropertyEditorValueConverters




10/04/2013                                                                                                    You are on page 7
Thank you.




Crumpled Dog Design - 18 Phipp St, London EC2A 4NU
020 7739 5553 | jeavon@crumpled-dog.com | www.crumpled-dog.com

More Related Content

What's hot

Node.js primer
Node.js primerNode.js primer
Node.js primer
Swapnil Mishra
 
WSO2 Gateway
WSO2 GatewayWSO2 Gateway
WSO2 Gateway
Kasun Indrasiri
 
Training Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMITraining Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMI
Continuent
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail Sorokovsky
Valeriia Maliarenko
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the Web
CodeValue
 
Actors and Microservices - Can two walk together? - Rotem Hermon, Gigya
Actors and Microservices - Can two walk together? - Rotem Hermon, GigyaActors and Microservices - Can two walk together? - Rotem Hermon, Gigya
Actors and Microservices - Can two walk together? - Rotem Hermon, Gigya
Codemotion Tel Aviv
 

What's hot (7)

Node.js primer
Node.js primerNode.js primer
Node.js primer
 
WSO2 Gateway
WSO2 GatewayWSO2 Gateway
WSO2 Gateway
 
Training Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMITraining Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMI
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail Sorokovsky
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the Web
 
Actors and Microservices - Can two walk together? - Rotem Hermon, Gigya
Actors and Microservices - Can two walk together? - Rotem Hermon, GigyaActors and Microservices - Can two walk together? - Rotem Hermon, Gigya
Actors and Microservices - Can two walk together? - Rotem Hermon, Gigya
 
Art Of Message Queues
Art Of Message QueuesArt Of Message Queues
Art Of Message Queues
 

Viewers also liked

BestCamp camping belgië
BestCamp camping belgiëBestCamp camping belgië
BestCamp camping belgië
Romano Groenewoud
 
Grape Digital Trends Newsletter 2
Grape Digital Trends Newsletter 2Grape Digital Trends Newsletter 2
Grape Digital Trends Newsletter 2
HUNGRY BOYS Creative agency
 
презентация студии тропинка
презентация студии тропинкапрезентация студии тропинка
презентация студии тропинка
boldino
 
2 берега 5 культур
2 берега  5 культур2 берега  5 культур
2 берега 5 культурbaikalov
 
Бесплатное продвижение сайта
Бесплатное продвижение сайтаБесплатное продвижение сайта
Бесплатное продвижение сайта
Paul K
 

Viewers also liked (6)

enlight logo
enlight logoenlight logo
enlight logo
 
BestCamp camping belgië
BestCamp camping belgiëBestCamp camping belgië
BestCamp camping belgië
 
Grape Digital Trends Newsletter 2
Grape Digital Trends Newsletter 2Grape Digital Trends Newsletter 2
Grape Digital Trends Newsletter 2
 
презентация студии тропинка
презентация студии тропинкапрезентация студии тропинка
презентация студии тропинка
 
2 берега 5 культур
2 берега  5 культур2 берега  5 культур
2 берега 5 культур
 
Бесплатное продвижение сайта
Бесплатное продвижение сайтаБесплатное продвижение сайта
Бесплатное продвижение сайта
 

Similar to What the heck is a Umbraco property editor value converter?

Umbraco OktoberFest 2014
Umbraco OktoberFest 2014Umbraco OktoberFest 2014
Umbraco OktoberFest 2014
Jeavon Leopold
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp
 
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
Jessica Tai
 
Babel.pptx
Babel.pptxBabel.pptx
Babel.pptx
Parham Abolghasemi
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
Betclic Everest Group Tech Team
 
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
IncQuery Labs
 
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...Jeavon Leopold
 
Life in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoLife in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with django
Tareque Hossain
 
Angular Ivy- An Overview
Angular Ivy- An OverviewAngular Ivy- An Overview
Angular Ivy- An Overview
Jalpesh Vadgama
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
Igor Talevski
 
React js
React jsReact js
React js
Nikhil Karkra
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
Marc Cyr
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
Mike Melusky
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
Viacheslav Bukach
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight convertersmsarangam
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
Microservices Architecture and Containers.
Microservices Architecture and Containers.Microservices Architecture and Containers.
Microservices Architecture and Containers.
imjacobclark
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
Web à Québec
 
Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)
benbrowning
 

Similar to What the heck is a Umbraco property editor value converter? (20)

Umbraco OktoberFest 2014
Umbraco OktoberFest 2014Umbraco OktoberFest 2014
Umbraco OktoberFest 2014
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interop
 
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
 
Babel.pptx
Babel.pptxBabel.pptx
Babel.pptx
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
 
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
 
Life in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoLife in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with django
 
Angular Ivy- An Overview
Angular Ivy- An OverviewAngular Ivy- An Overview
Angular Ivy- An Overview
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
 
React js
React jsReact js
React js
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight converters
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Microservices Architecture and Containers.
Microservices Architecture and Containers.Microservices Architecture and Containers.
Microservices Architecture and Containers.
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Nodejs
NodejsNodejs
Nodejs
 
Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)
 

Recently uploaded

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

What the heck is a Umbraco property editor value converter?

  • 1. What the heck is a Umbraco property editor value converter? Jeavon Leopold - Twitter: @crumpled_jeavon e: jeavon@crumpled-dog.com www.crumpled-dog.com
  • 2. What the heck? What is a data type property editor? • Property editors are the actual editors that are rendered to the content editors, implemented using AbstractDataEditor or IUsercontrolDataEditor • Data types (stored in DB) implement a selected property editor (coded in C#) • Content values are stored as a string in prevalue(s) (often as CSV, Json or XML) So what is a property editor value converter? • Introduced in Umbraco v4.10 • Applies to MVC razor rendering only (there is a similar mechanism for razor macros called Razor Model Binding) • Converts the stored content value string to some other type e.g IPublishedContent • Can be included with a property editor (especially if property editor is a package) 10/04/2013 You are on page 2
  • 3. How is this useful? How many times have you had to split in Razor to use MNTP? • My version for Razor Macros: • In MVC (using dynamics), a little better, maybe  10/04/2013 You are on page 3
  • 4. How is this useful? • In MVC (typed), definitely no better  Pretty complicated for a front end developer trying to do some basic Razor templating? With a property editor value converter implemented on MNTP (using dynamics) Definitely better  Complicated now? • Doesn’t matter if XML or CSV storage type used by MNTP, the converter takes care of it • Implemented in both Typed and Dynamics 10/04/2013 You are on page 4
  • 5. How to implement a converter? Implement IPropertyEditorValueConverter • Found in Umbraco.Core.PropertyEditors namespace • Two methods: IsConverterFor & ConvertPropertyValue • Use UmbracoHelper if it helps Example converter for Content Picker 10/04/2013 You are on page 5
  • 6. Quick demo • Fresh Umbraco v6.0.3 using NuGet • Install Standard Website MVC • Build MNTP Property editor value converter • Copy dll into solution • Update the Razor slideshow 10/04/2013 You are on page 6
  • 7. More? Umbraco Core Property Editor Converter Package (Umbraco v6 only) • Implements converters for Umbraco Core property editors • Will hopefully be merged in Umbraco pre v7 • http://our.umbraco.org/projects/developer-tools/umbraco-core-property-editor-converters • Check out the source code https://bitbucket.org/jeavon/umbraco-core-property-editor-converters • Helper method WIP – provides access to the data type settings so that you can alter the return type depending on the settings Documentation • http://our.umbraco.org/documentation/Extending-Umbraco/Property- Editors/PropertyEditorValueConverters 10/04/2013 You are on page 7
  • 8. Thank you. Crumpled Dog Design - 18 Phipp St, London EC2A 4NU 020 7739 5553 | jeavon@crumpled-dog.com | www.crumpled-dog.com