The Appliance itself is very limited in what it's able to return on a keymatch: a title field and a URL field.

What is very common practice is for the title field to be overloaded with pipe-delimited information. In this way, it's possible to theme in something richer than just title text and a link.

KeyMatch Title|link_to_image.jpg|Short bit of description

There are some limitations: the GSA Admin configuration page is limited to 100 characters in the title field, and the maximum size of the field in general is something like 256-512 characters (which can be achieved by circumventing the first limitation by adding keymatches via a spreadsheet).

Rather than supporting a number of fields with pipe delimited information, it might be better to implement a special content type that contains an arbitrary collection of fields. Then, the title entered into the GSA configuration for keymatches would be something like...

KeyMatch Title|nid

Where 'nid' is the Node ID of the corresponding keymatch content. We'd load the node based on the nid that's passed through (or just default to current behavior if no nid is found in the title string), and then pass the node object to a theme function or template where the fields can be themed into something appropriate.

Don't know if this is appropriate for the core Google Appliance module or better off as its own thing.

Comments

iamEAP’s picture

Title: Add Support for KeyMatches » Add Support for Rich KeyMatches

Sorry, KeyMatches are already supported. Edited the ticket and title to reflect something related but better.

mpgeek’s picture

Status: Active » Closed (works as designed)
iamEAP’s picture

Title: Add Support for Rich KeyMatches » Make Keymatches Templated / Easily Themable
Status: Closed (works as designed) » Active

Reopening with an even clearer title.

To reiterate:

  1. Keymatches should be themable. Ideally, there should be a template file that themes can override.
  2. I also think there's a strong case for dealing with pipe-delimited data being returned in the keymatch title. This is standard practice when companies want their keymatches to be a little richer than plain text. The special case is if the delimited data were, for example, a node ID. Sure, we could parse the NID out in the template file, do a node load, and get the information we wanted, but that unnecessarily puts a lot of bloat in the template file.
  3. The node ID, probably corresponding to a node of a special type "keymatches," is especially appealing when you think of the limited space you have for pipe delimited data in the Google Appliance admin interface (for sending along image URLs, extra text, etc).

The second item may be a bit lofty, but at the very least, I think keymatches ought to be themable.

mpgeek’s picture

Version: 7.x-1.x-dev » 7.x-1.4
Status: Active » Postponed (maintainer needs more info)

Just wanted to point out that we do have a keymatch template (/theme/google-appliance-keymatch.tpl.php), so you can theme that easily. Also, the pipe delimited data in the "rich" keymatch, to me, seems specific to your use case, and perhaps you override template_preprocess_google_appliance_keymatch. Is there an argument for supporting this out of the box with the module?

iamEAP’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Started digging into this (and a bundle of other 6->7 update issues) and I think you're right. I should have taken a closer look earlier. Marking as closed, works as deisgned. Thanks, mpgeek!

iamEAP’s picture

Issue summary: View changes

Turns out KeyMatches is already a supported feature. Proposing adding "rich" KeyMatches instead.