Element set label + description questions

22 views
Skip to first unread message

caitlin...@gmail.com

unread,
Mar 15, 2014, 7:37:30 PM3/15/14
to omek...@googlegroups.com
Hi All,

I have a couple of questions related to element sets:

1) What is the function of "label" vs. "name"?  Without any further information I would have assumed that "Label" would be the human-readable set of words that appears in the public view of an element, and "Name" would be the machine-readable identifier for this value.  But I'm wrong.  "Name" gets stored in the database and label doesn't(?) and the same words function to call the element in the code and as the human-readable label.  This is sort of a problem for me when the preferred label in the public view is something like "What significance does this object have for your institution?" and I'd love to call that "InstSignificance" in code.  Or when two elements should be labeled the same thing publicly ("Description") but differentiated behind the scenes ("VendorDescription" vs "AdminDescription").

Any advice for these situations?

2) I also would like to remove the description from our custom element set, and have only the comments available for any element.  That way we can edit the comments any time (for various reasons...) I'd like it so that the <p class="explanation"> doesn't appear if the description is null, but I'm not sure how to approach this.  If anyone has any advice on this, I'd appreciate it.

Thanks so much!  This dev list is a wonderful resource and I appreciate all the help of everyone here :)

Caitlin

Patrick Murray-John

unread,
Mar 17, 2014, 1:46:33 PM3/17/14
to omek...@googlegroups.com
Hi Caitlin,

Quite correct, we do kinda collapse "Name" and "Label" into the common referent for both storage/lookup and display. Thus, Omeka can't quite work with things like the vendor and admin descriptions you describe directly, but it could do so through a filter and a public theme override.

That said, the combination of your 1) and 2) questions might hint at the way around it. If you customize your theme to only display the comments as per 2), then you could use whatever name you like to address 1). Indeed, in 1) is already sounds like what you really want to display is the 'comment', which we're thinking of as site-specific explanatory text for each element. We added that to help people deal with the deliberate ambiguity of Dublin Core, but it certainly applies to other element sets, too.

It sounds like this will matter on both the admin and public sides. The public side is easier: you can override the file '/application/views/scripts/common/record-metadata.php' by copying it into your theme's `/common` directory. Then, you can customize the display fairly easily by switching around the element name to replace the text, show or not show the comments, etc.

For the admin side, you'd probably be looking at using the Element Form Filter. There, you could make similar replacements [Now that I look at it, that's probably where some of the name/label confusion is coming from?]. It sounds like it'd mean a lot of filters, but should be doable.

I haven't tried all that yet, but that's probably the direction I'd try first.

Patrick
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at http://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages