I've been playing around with views. For arguments, I noticed the following:

1) For titles & authors, substitution of '%1' is not done neatly.
If e.g. you create a 'Biblio: keyword' argument and you enter "Keyword: %1" in its 'Title:' textbox... then your titles will look like this:
"Keyword: 9" (where 9 is the `kid` database field)
they should of course be:
"Keyword: [the keyword itself]"

2) There is no "Type of Publication" argument. (There's an argument for "Type of Work", but that's different. That's a real biblio field, not 'the type'.)

Both issues solved in attached patch.

I solved the 'substitution of %1 by name instead of ID' in the titles in a generic way, so one (new) views argument handler is used by the 'author', 'keyword' and 'type' arguments. (No idea if / why views has not solved this by itself...)

PLEASE NOTE: I do not really know PHP5 OO stuff. I copied over the whole title() method in this new 'extended object'.
Please, someone tell me that I'm stupid and this can be handled in a better way :-)

CommentFileSizeAuthor
#1 biblio.views-arguments1.patch3.93 KBroderik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roderik’s picture

.

ebeyrent’s picture

+1

rjerome’s picture

Status: Needs review » Fixed

I've added a slightly modified version of this patch. There was no need to override the title() method if it didn't change from the parent class.

http://drupal.org/cvs?commit=366448

Ron.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.