Accessing private metadata on public end


Is there any to access to private metadata on the public end, but not for displaying? Basically, I’m working on a module that needs to link together multiple media attached to the same item, in this instance a video file and related caption file. So when I render the video file, I need to loop through the item’s media and find matching metadata in the related media? However, I wanna match on metadata that’s private. So this works on the admin end, but when I try on a public site, it doesn’t match because it skips over the private metadata when I use media->value().

I guess there’s probably another way I can get around this, but I’m just wondering if there’s anyway that private metadata can be accessed strictly for non-display purposes?



The system used to hide access to private values, and other private things, is pretty low level: there’s no convenient way of getting around it really.

You can do it with direct database access, by mucking with the ACL or current user, but none of that is really straightforward.

You might consider not having the values here be private, but instead just hiding them from display (similar to how Hide Properties works, or just by using Hide Properties). In Omeka Classic’s Html5Media plugin we also did something similar with videos and captions just by matching up the “original filenames”: video.mp4 matches with video.vtt, etc.

Thanks so much, John. Yeah, I’ll just go ahead and use public values, then.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.