I have an Internal Link Field in a custom template in Sitecore 8. I want the user to use the Link Field to ONLY select a (say) PDF File from the Media Library. When clicking on "Insert Link" the Media Library pops up, scoped to the node I set in the DataSource Field. In here, I want the user to only see PDF files.
Is there any chance this can be done with the Internal Link Field?
Or maybe some other way around that problem? I don't want to have a custom Field Validation that prevents the user from saving the actual item. I'd rather have the user not selecting any "wrong" files for the field.
Thanks in advance.
Out-of-the box you will not be able to do this. You have a few options that I can think of right now:
Datasource=/sitecore/media library/....&IncludeTemplatesForDisplay=Pdf,media folder&IncludeTemplatesForSelection=Pdf
as datasource - your datasource will do exactly what you want but your editors will be able to select multiple pdf's (this can be checked with validation but you wanted to avoid that)query:/sitecore/media library/....//*[@@templatename='Pdf']
as datasource - now they can only select one, but you get a flat list of items and that might be not that easy to work with