I'm trying to auto generate citekey with the folling php:

print $node->biblio_type_name;
print $node->biblio_contributors[0]['lastname'];
print $node->biblio_type_of_work;
print $node->biblio_year;

The instruction tell us not to include <php?

Do we have to check autogenerate?

Comments

rjerome’s picture

You would probably want to use something like this...

echo $node->biblio_type_name . $node->biblio_contributors[0]['lastname'] . $node->biblio_type_of_work . $node->biblio_year;

rhaschke’s picture

As stated in the description, you need to return the citekey. Hence, use:

  return $node->biblio_type . $node->biblio_contributors[0]['lastname'] . $node->biblio_type_of_work . $node->biblio_year;

Note, that a biblio node has no biblio_type_name member, only a numerical member biblio_type.
And yes, you need to check the autogenerate checkbox.

rjerome’s picture

Thanks Robert,

Actually, biblio_type_name is added in biblio_load()

Ron.

liam morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.