Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Benoit Cornette 29 posts 169 karma points
    Aug 04, 2019 @ 03:43
    Benoit Cornette
    0

    How to let my user add steps for a recipe

    Hi,

    I want to make sure my client can add steps for recipes on his website. Just one field (for example a RTE) isn't enough because I want to add the functionality of the featured snippets. Every step will be a "text" input in the "recipeInstructions" section. Any idea what would be the best property editor for this? Just some text isn't enough (I tried repeatable textstrings), I want to make sure my client can do some minor modifications such as bold, italic etc.

    Kind regards,

    Benoit

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Aug 04, 2019 @ 20:44
    Marc Goodson
    101

    Hi Benoit

    Have a look at NestedContent property editor.

    This allows you to use a document type to define a repeating set of properties.

    so if you create a Document Type Without Template called 'Recipe Step' give it the following properties

    • Title - TextString
    • Method - RichTextEditor
    • IngredientsInvolved - TextEditor
    • StepType - dropdown

    Then create a new Property on your Recipe Document Type that uses Nested Content as the Property Type - and tell Nested Content to use the RecipeStep document type as it's repeating definition...

    The editor can keep adding steps, and will have a rich text editor for each step to describe the method involved... and anything else you define as being required for the step instructions.

    Then in your template, you will loop through each NestedContent item, each step will be represented by an IPublishedContent item, and you can write out the values in the desire structured markup.

    You could have different 'step types' that will have different visual appearance when you right out the steps...

    making lots of assumptions about what you are trying to achieve!!

    but check out Nested Content!

    It think its what you are after...

    https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Nested-Content/

    regards

    Marc

  • Benoit Cornette 29 posts 169 karma points
    Aug 05, 2019 @ 16:20
    Benoit Cornette
    0

    Hi Marc,

    Thans for your help, works perfect!

    Kind regards,

    Benoit

Please Sign in or register to post replies

Write your reply to:

Draft