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

Mark Media as Featured or Album Cover - Admin Upload

Started by Muut Archive 11 years ago · 4 replies · 413 views
11 years ago

Hi,

I know we can use a yaml file to give metadata for an image file - I guess we can use this to mark an image as featured or to mark an image that should be a hero image for example.

Is there a way to include this in the 'Page' section on the admin interface (can I include a custom form with a couple of checkboxes for example?)

Thanks,

Chris

11 years ago

Adding media metadata handling is something we are doing for the admin pro plugin as part of a new media manager system.

11 years ago

Okay. In fact, I'm just playing with it today but I can't really work out much with it. How can I loop through the media on a page and output the image with the correct alt tag, as defined in it's meta.yaml file?

11 years ago

Also, when I turn on the Debugger, I get a JS error in the console - PhpDebugBar is not defined

11 years ago

Check out this Gallery Example to show you how to loop over media and associated metadata.

Regarding debugbar, not sure. It could be related to the theme you are running. if it doesn't have the same kind of Assets setup as Antimatter and the majority of the other themes, it might not be able to load the required JS files.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago