Hello,

I would like to display the results of a views of indexed node fields: title and image.
In the .tpl file, I've written this:

<h3><?php print $row->node_title; ?></h3>

This works for the other views but not for Indexed ones. Should I use another variable?
I've the same issue with field_field_image. Any idea?

Thank you very much beforehand!!!

Comments

willbxl created an issue. See original summary.

willbxl’s picture

I am making many tests but all unsuccessful.

The result I get is the number of item I was expecting (number of products) so the views is working well. When I click on the facets of the faceted search, items are filtered well. But I have no picture, no title and the link to content is pointing to /node on every items.

My results can be checked here: http://www.dem-group.com/shop2

Should I load something special for Indexed node fields?

drunken monkey’s picture

Issue tags: -Indexed node, -title, -image

Looking at your link, it seems you've now managed to solve this?
In general, yes, the Search API doesn't include the same data as normal views in the result. The fastest way to find out what you have and what you need to load is probably using something like this as the result template:

print '<pre>' . check_plain(print_r($row, TRUE)) . '</pre>';

Maybe you only get the IDs and would need to do a manual node_load_multiple() in a preprocess hook.

PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.

drunken monkey’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.