Hello !

I would like to include the field "Abstract" in the teaser of the biblio node, but I could not find how. It would be nice to have the possibility to indicate which field we would like to have in the teaser (as in CCK for example). But even a simple hack to achieve this would be of great help.

This is related to another problem I have : I tried to output the abstract field in a view, but the view does not render the html code in it (tried to set the asbtract field to 'full html' filter but it did not work either) - the code comes from FCKeditor. It does not seem to be a views problem, since views render properly other CCK fields with html tags generated by FCKeditor. In order to solve this I thought I could use a teaser view with the asbtract included, and here I am.

Many thanks in advance for any suggestion (for both problems).

Tomski

Comments

rjerome’s picture

The teaser is rendered in the biblio.module file, in the biblio_view() hook at line 1715, at which point you have access to the complete "biblio" node, so if you wanted you could tack $node->biblio_abst_e onto the end. Of course, given it's a teaser, and you don't know the length of your abstracts, you might want to check the length and truncate it if it's too long.

WRT your html issue, I think that might be that you have to set the node format to be FULL HTML. This is a little misleading on the input form because the "Input Format" field set is within the "Full Text" fieldset (I've changed this in later versions). The format actually referrers to the entire node, not just the "Full Text" field.

Ron.

tomski’s picture

Dear Ron,

Thank you again for your great help. I still have problem with the html output, but I managed to add the biblo_abst_e to the teaser.
For those who are not familiar to php and want to the same thing this is the modified line :

$node->content['teaser']['#value'] = theme('biblio_style', $node, $base, $style) . $node->biblio_abst_e;

Tommaso.

mattsplatw’s picture

I'm also wondering how to render the HTML correctly when using the Biblio abstract field in Views? Was this problem after solved? Does anyone have any suggestions?

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.