Add meta data to the edit Image Form

paul wyatt asked on April 18, 2017 13:44

I am looking at a way to add custom properties on to an image in the Edit Image property popup. I have added grouped page attachments to a page and upload images to the page using this method I can edit the page attachment and the edit image pop shows and I can set the normal properties title, Description etc and all the resize sections also show.

I would like to add a new text property that will show in the edit image popup. I have been looking at adding properties to the Media File class as shown here https://docs.kentico.com/k9/custom-development/editing-system-tables this works in a media library and the custom properties tab shows in the media Library let me set the text required but as I am using Grouped page attachments the custom property does not show when I edit the image in the edit image popup.

Any advice would be a great help

Recent Answers


Trevor Fayas answered on April 19, 2017 00:27

May be a tall order!

This isn't sure fire, it will take a bit of development, but here's where i would start.

  1. Create a new Module
  2. Create a new Class to house the new page attachment meta data, that has an int field that is a Binding reference to the CMS Page Attachments
  3. Then, in the Module > User Interface, see if you can add a new interface to the Media Dialog.
    1. You may be able to add a child to the Attachments tab to house your logic, but possibly not as the Attachment tab isn't really a tab-display template.
    2. If the above doesn't work, you'll need to create a interface next to the Attachments tab, and then create your own interface to read the current page's attachments, list them and allow you to add additional attributes which will fill in your new class

Once you have all this, you'll need to either clone and modify the existing tools that pull in the page attachments, or create your own that will utilize the expanded modules.

All the above can be found in the documentation, but again it's a pretty large task!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.