The Download output is currently generated in biblio_theme.inc
It would be nice to move this (or theme it) within a style so users might change how the download link is generated. For example, i have modified the biblio_theme.inc to tag the link with a css class (pdf) so i can add an icon to this kind of links through css.
An extension to that is to provide several css classes representing each type of content so users can change the look and feel of a specific biblio output style through css (instead of fighting with php). For example, provide css class tags for the export links.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | wrap_download_output_to_theme_function_v2.patch | 2.62 KB | setack |
| #3 | wrap_download_output_to_theme_function.patch | 2.63 KB | setack |
Comments
Comment #1
Frank Steiner commentedIf you can deply an own module, you can use hook_theme to overwrite the theme_biblio_list function and restyle whatever you want.
I guess it's split because style like IEEE don't define stuff like download links :-) But maybe it was possible to check for additional style file, i.e., if there is blabla_style.inc the code could check for blabla_style_download.inc and blabla_style_export.inc etc. and use those when they exist.
Comment #2
setack commentedI rename the issue as it's somewhat related and to not overwhelm with new features requests.
I just began to understand how theming works :-) so... I've just overriden the 'biblio_export_links' function to add some stuff but the download output in biblio_theme.inc#theme_biblio_entry (line ~380) is hardcoded in there. Instead of having to override the whole function, it would be nice to wrap the download output into a theme_download_links so theme developers can override only this function.
Comment #3
setack commentedHi, i created a patch to wrap the download output to a theme function. I think this way the code looks more consistent as you allow theming everything in a bib-entry.
I googled to create the patch so i might be created it in the wrong way. Cheers.
Comment #4
setack commentedComment #5
Frank Steiner commentedThe second
return $files;intheme_biblio_download_linksshould be areturn '';in case you always want to return a string (the cleanest way). Otherwise I would remove it instead of returning an undefined variable.Apart from this, I think this patch definitely makes sense!
Comment #6
setack commentedupdated :-)
Comment #7
Frank Steiner commentedComment #8
rjerome commentedGood idea...
...Committed to CVS
Ron.