Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

If else within page blueprints?

Started by Muut Archive 10 years ago · 2 replies · 403 views
10 years ago

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.

10 years ago

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

10 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1354 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4065 9 years ago
Archive · by Muut Archive, 9 years ago
1 2953 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago