Has anyone ever integrated this module with the display suite module. I am trying to pull up a specified number of results in a sidebar and edit their output using a view mode in display suite.

Thanks for any help in advanced.

Comments

iamEAP’s picture

Hey @sandstorm_trooper. This is a bit difficult to do because one of the main features of GSA is to index non-Drupal assets/entities/etc (and obviously, those assets/entities have no concept of a "view mode").

That being said, what you're asking for is possible, though not particularly easy. Here's a rough outline, off the top of my head:

  • Create a custom module (or get ready to add some more stuff to an existing one).
  • In your custom module, you'll need to add meta tags to all node / other entity pages for which you would want to use these special view modes. You can call the meta tags whatever you like, but you'll want the node ID (or entity ID and a separate tag for entity type). For example: <meta name="gsa_entity_type" content="node" /><meta name="gsa_entity_id" content="1234" />
  • Once those are in, you'll need to wait for your pages to be re-crawled / indexed. Once that's done, it should be available in the XML returned by the GSA for each search query.
  • Create a block (hook_block_info + hook_block_view) that pulls data from the main search result object (good info on that here: #2134045: Filtering / Faceted Search Results
  • Use the data in the search result object to run all of the necessary code to render the entity using the desired view mode

Like I said, possible, but not easy. It's possible that it could be generalized, but I'm not 100% how / what features to support. This lines up a bit with adding onebox capabilities, which is also non-trivial.

I'll leave this open for now, but unless we come up with a solid implementation plan, I may close it as "won't fix."

Hope this helps!

iamEAP’s picture

Status: Active » Closed (won't fix)

Closing as won't fix, though I'd gladly review proposals.