Teaser image extraction as a view field

Asked by nonzero

When I use the view field called "Node: Teaser", the image extracted is at its full size instead of the teaser size specified in the ProsePoint "Teaser images" configuration. Apparently, I have to use the Row style "Node" instead of "Fields" for the view to display teasers images the appropriate size because the image extraction is done only in the nodeapi hook. How would I duplicate ProsePoint's resizing behavior as a view field?

I tried creating node-view-TYPE.tpl.php, but since I am using Organic Groups, I'm getting a Description field which I don't want. The easy way to get rid of this field is to use Row style: Field in the view, but that leads me to the above problem of not resizing the image.

Question information

Language:
English Edit question
Status:
Answered
For:
ProsePoint Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
bengtan (bengtan) said :
#1

Hi,

The teaser image resizing is done by some code which is normally invoked when a node is viewed as a teaser ie. the normal node viewing process is operating.

Views doesn't do this with Row Style: 'Fields' because Views directly fetches the data from the database tables and displays it, bypassing the resizing code.

If, instead, you use Row Style: 'Node', then Views goes through the normal node viewing process and the resizing code does get a chance to run.

So, how to resolve this?

1. Use Row Style: 'Node'

2. Commission me to create a new Views fields which is identical to 'Node: Teaser' but also goes through the resizing code.

3. Try using node-view-TYPE.tpl.php and somehow rid of the unwanted Description field.

Comments:

1 is the quickest but may not give what you want.

2 is the cleanest, most ideal solution. However, it requires some development, I'm sort of busy, and I'm not sure whether you have a budget for this sort of thing.

3 ... I'm just mentioning for now. I wasn't aware of the node-view-TYPE.tpl.php template so I can't say with certainty that it will or won't work.

Can you help with this problem?

Provide an answer of your own, or ask nonzero for more information if necessary.

To post a message you must log in.