Neatline - How to control what shows in the bubble

Hi,

How does one control what shows up in the pop up bubble when items are imported from Omeka to Neatline? Right now I end up with things like:

Dublin Core
Title
Still Image Item Type Metadata
Original Format
Files

I don't want any of this text to show. How do I go about getting rid of that?

Thank you

You could simply hide this content with CSS, by adding a rule set your theme's CSS, something like:

.bubble .item {
    display:none;
}

The information will still be there in the HTML, but not displayed.

Another option is to simply delete the link between the Neatline record and the Omeka item. You can do that by clicking on a Neatline record in your exhibit, then selecting the "Item" tab, and then click teh "x" beside the title of the item in that select menu. That formally breaks the relationship. You'd have to do this for each item in your exhibit.

There may also be a way to filter this content before it gets displays, and replace it entirely with whatever you want. I'm not sure about this though, and will have to look more closely at the code before I can say for sure. When I do that I'll follow up here.

.bubble .item {
display:none;
}

doesn't work for me

If I delete the link between the Neatline record and the Omeka item, then my item no longer shows.

Try doing the nuclear option in CSS: !important:

.bubble .item {
    display:none !important;
}

I suspect there's another CSS rule elsewhere that's overriding this one.

OK, but that removes everything including the item itself. All I want to get rid of the words NOT the actual item. I don't need to show these headings:
Dublin Core
Title
Still Image Item Type Metadata
Original Format
Files

If you're wanting to hide the headings, but not the content, you'll need to create some rather complex CSS rules like Jeremy provided. Essentially you'll need to use the developer tools in your browser to inspect the elements you want to hide and write a CSS rule to set the display to none. Something like this:

.bubble .item h2, .bubble .item h3 {
    display: none !mportant;
}

Wayne,

I'm confused, none of the Neatline examples I have looked at (http://neatline.org/neatline-in-action/) don't have these headings displayed. Do they all use complex CSS rules to control the content of the bubble?

No, those use an older version of plugin...

I see. Is there a reason why the new version doesn't have an option to display items like that? I mean this looks pretty messy the way it is now.

Wayne, does the Neatline item view pull from the usual record-metadata.php? If so, it might be possible to control the output with PHP conditionals in that file of your theme instead of with complex CSS.

sheepeeh, I don't believe that it does.

However, that reminded me that it does look for the partial neatline/exhibits/item.php in the public theme.

That will get called on each item that's displayed, and you can put whatever you want into it. The default one is in views/shared/exhibits/item.php.

Ah, even better! So, tarsierspectral, you can copy the default view to your theme, and then replace the line:

<?php echo all_element_texts('item'); ?>

With calls for the individual elements which you *do* want to display, e.g.

<?php echo metadata('item', array('Dublin Core','Title')); ?> to output the title.

If you list all of the elements you want to show in this way, you will only have headings if you explicitly write them in.

In Omeka 2.2, you can suppress the element set heading ('Dublin Core') by unchecking the last box ('Show Element Set Headings') on /admin/appearance/edit-settings for your site.

Wonderful, thank you. I will give this a try.

Hello sheepeeh,

I am having what sounds like the same problem as tarsierspectral. I have tried your suggested solution ("In Omeka 2.2, you can suppress the element set heading ('Dublin Core') by unchecking the last box ('Show Element Set Headings') on /admin/appearance/edit-settings for your site.")

However, with only partial success. The Dublin Core items have disappeared as hoped, but other Element Set Headings related to the Omeka Item remain. I have tried unchecking both 'Show Element Set Headings' and 'Show Empty Elements'.

Just like tarsierspectral I think, I am aiming to have my Neatline records linked to Omeka items, but when viewing Neatline, only display the text added in the Neatline editor. I am using Omeka 2.2.2. Is there a way to achieve what I am aiming for?

Thanks for your help.

Hi jlepawsky,

If you look in my comment above, I talk about creating a file named neatline/exhibits/item.php in your Omeka theme. You can use that to directly control what appears when each item is displayed.

I'd start by copying the contents of the current default file, which I linked to above, into that file. From there, you can follow sheepeeh's pointers about what to change in order to display only the fields (without the titles) that you want to display.

Hope this helps,
Eric