I am having a node reference.How can i get its excerpt content?
For getting title or body we use:-
print $entry->title;
print $entry->body;
How i can get the excerpt of that node.(i am using excerpt module)
I am having a node reference.How can i get its excerpt content?
For getting title or body we use:-
print $entry->title;
print $entry->body;
How i can get the excerpt of that node.(i am using excerpt module)
For the stock teaser, it would be $entry->teaser but your best bet is to use
drupal_set_message(print_r($entry, true))
and look through the key=>value pairs.
For a better looking array, install the Devel module and use
dsm($entry)
The teaser of a node is contained in $entry->teaser
; if the field is not initialized, then the function node_teaser()
is the function used to build the teaser.
If the module is saving a custom value as excerpt, you should verify which is the property used from the module (I would check $entry->excerpt
, though).
I would suggest you to install Devel, which has some debug functions, including dsm()
that allows to inspect any PHP value, and also adds a tab "Devel" for each node.