Jump to content

Custom Output Question


BarFactory

Recommended Posts

So I created the following schema for my cocktail ingredients (there are almost 2000 ingredients so I deleted them here to shorten the post).  It appears to work perfectly for submitting drinks but now I am struggling to get the output on the detail page to appear.  I want to have the ingredients output display similar to how they would with the standard recipe output file.  I've messed around with the default recipe.thtml file in my overrides folder but cannot get anything to appear properly.

------------------------------------------------------------------------------

 

{
    "title": "Cocktails",
    "type": "array",
    "format": "table",
    "items": {
        "title": "Ingredients",
        "type": "object",
        "properties": {
            "measure": {
                "title": "Measure",
                "type": "string",
                "options": {
                    "input_width": "15em"
                }
            },
            "ingredient": {
                "title": "Ingredient",
                "type": "string",
                "$ref": "#\/definitions\/ingredientlist",
                "options": {
                    "input_width": "25em"
                }
            }
        }
    },

    "definitions": {

        "ingredientlist": {

            "type": "string",

            "enumSource": [

                {

                    "source": [

                        { "value": "", "title": "--Select Ingredient --" },

                        { "value": "151-proof-rum", "title": "151 Proof Rum" },

                        { "value": "1800-reposado-tequila", "title": "1800 Reposado Tequila" },

 

                        ],

                    "title": "{{item.title}}",

                    "value": "{{item.value}}"

                }

            ]

        }

    }

}

recipe.thtml

Edited by BarFactory
Link to comment
×
×
  • Create New...