Greetings,
I'm trying to re-theme my node-biblio.tpl.php
What I want is instead of the teaser title to display the biblio-type and the actual full biblio-title. Like this
Journal article -- Doe, John "The name of some random article: and its subtitle." Journal Name, Spring 1990, no. 1 (1990)
The default node.tpl.php has this code:
<?php if ($page == 0): ?>
<h2 class="title"><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
<?php endif; ?>
So basically I need to replace $title with some other variables that Biblio module outputs. But as much as I searched I could not find which variables I would need for Biblio-type and Biblio-Title.
Any suggestions or pointers much appreciated...
Comments
Comment #1
drupalina commentedafter getting to know the logic of biblio_theme.inc I've got this quirky thing to work... SORT-OF....
But it is displaying the author name after the publication name, it doesn't inherit the styles (like title of publication should be in italics) and it displayed links to RTF, Tagged, XML, BibTex, Google Scholar, which I don't need in node title.
Since I'm not much of a coder (though I try), I need a little help with the correct syntax for the arrays for theme_biblio_entry. What would be the correct syntax to bring in the styles (Chicago, etc) and to remove the "RTF, Tagged XML, BibTex, Google Scholar" links ???
Thanks in advance...
Comment #2
rjerome commentedRather than theme_biblio_entry, you probably want to use theme_biblio_style($node, $base = 'biblio', $style_name = 'classic', $inline = false)
Comment #3
drupalina commentedAwesome! It worked.
One last question: how do I output the machine-readable version of biblio_type_name? (I want to add class="journal-article or book or web-article" so that I can add some css)
Comment #4
rjerome commentednot sure what you mean by "machine-readable", but it would seem that you are already accessing it with
"$node->biblio_type_name"
Comment #5
drupalina commentedIf in div tags I write something like:
then for journal articles the div tags will output class="Journal Article" and because of that space, for effective css-ing that's not as good as class="journal-article". That's why I was asking if it was possible to output the machine-readable name for "Journal Article".
Comment #6
rjerome commentedAhh, ok, unfortunately the only other incarnation of biblio_type is an integer, but what you could do is...
Comment #7
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.