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 :-)
Comment | File | Size | Author |
---|---|---|---|
#1 | biblio.views-arguments1.patch | 3.93 KB | roderik |
Comments
Comment #1
roderik.
Comment #2
ebeyrent CreditAttribution: ebeyrent commented+1
Comment #3
rjerome CreditAttribution: rjerome commentedI'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.