Hi,

Is it possible somehow to link the record to the repository? So I can use the repository as a filter in Views to only view records from repository x?

Thanks in advance!

Comments

janusman’s picture

The module currently does not give out information regarding the repository name. It would also need to be something that would have to be present in the XML returned by the OAI service. For instance, we could use the repositoryName from the verb=Identify... like this http://ir.library.strathmore.edu/oai2.action?verb=Identify

I'll try to see what this entails, maybe this is not a biggie. Code welcome, though!

Bertjuh’s picture

Hi,

I've achieved exactly what I wanted in Views 3 with the available information of the Owner Feed. I'll try to explain what I did as clearly as possible. Let me know if it is not clear.

In my site I have two content types to harvest the OAI stuff through your module: 1. OAI repository, which is a feed. 2. OAI imported record.

I created two views in total:

1. View: "Show a page with all x nodes as teaser, of content-type OAI imported record where the feed owner nid equals to an argument (from URL)". Lets call this the results page.

Format:
Show content | Teaser

Filter criteria:
Content: type = OAI imported record

Advanced > Contextual filters
Feeds item: Owner feed nid

2. Then, I created a views that gives me a block with a dropdown box with a list of all OAI repositories (feeds)
I did this with help from this post: http://stackoverflow.com/questions/3881718/drupal-views-exposed-filter-o...
When a repository (feed) is selected from the dropdown the page is reloaded and the feed nid is added to the URL as a query string. This is picked up by the contextual filters in the page-view.

Lastly:
On a page I added both the block and the page. The dropdown menu (or jump menu if you like) shows all OAI repositories and the results block that only shows records when a repository is selected. *insert happy dance*

Note: If you want to get the contextual filters to work on a block (e.g. if view nr 1 above is a block instead of a page) you have to do something extra, because a block is not aware of the arguments of the current path.
Do this: In the contextual filter setting of the feed nid > 'when the filter is not available' choose: provide default value > type = raw value from URL > path component x (depends on if your arg is the first, second, third etc argument in the query string of the URL)
See: http://drupal.stackexchange.com/questions/27818/contextual-filter-with-a...

Note2: I have not checked out better exposed filters module (yet): http://drupal.org/project/better_exposed_filters

When my site goes live in a couple of days I can add the URL to this post so you can see the result if you like.

Bertjuh’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Way overdue but here is the link: http://www.surveydata.nl/