I made a custom nodetype for biblio author and it has authorID input_field ($node->field_bib_auth_id)
For a single page I can successfully insert the php snippet in the body like below :
include_once drupal_get_path('module','biblio') . '/biblio.pages.inc';
print biblio_db_search("inline", "author",9);
for example the above authorID is 9
how to put code in template so the authorID can automatically get from input_field ($node->field_bib_auth_id)
the below code does not work
include_once drupal_get_path('module','biblio') . '/biblio.pages.inc';
print biblio_db_search("inline", "author",$node->field_bib_auth_id);
I know very few about php
Comments
Comment #1
reprabowo commentedadditional infom i wish to have $node->field_bib_auth_id from default biblio authorID
Comment #2
reprabowo commentedComment #3
reprabowo commentedComment #4
rjerome commentedYou might try
$node->field_bib_auth_id[value][0]
Comment #5
reprabowo commentedrjerome... it does not work
Comment #6
rjerome commentedopps, I think I had that backwards... it should have been
$node->field_bib_auth_id[0]['value']If you want to do a little crude debugging, you could always just add the following before you call biblio_db_search()...
Then you will see exactly what the node object looks like. Post it here if you want.
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.