If else within page blueprints?

I was wondering if it would be possible to have some kind of conditional logic within blueprints.
In my case I want to make a list of porfolio (teaser) items. Therefore the user can add different types of items. Iframes (via textfield), audio (via filepicker) including cover image (via filepicker) or an image (via upload) including alt and title textfields.

So it would be great, if I could integrate a select or toggle option for the user: “create iframe item”, “create audio item”, “create image item”. And then only show the relevant form fields for that item type.

By now the user gets presented with a huge list of fields. Even though he might only need one text field to paste in the iframe code.

Currently this is not possible yet, and not sure if it will ever be possible.

I guessed so.
Would be cool though, if one could define sort of a blueprint partials, that could be picked by the user via a file picker or something. But maybe this is a bit over the top.

Nonetheless by now I just love grav. Gives me so much freedom to create individual sites.

1 Like