Sorry if this has been covered elsewhere. I've searched and just haven't picked the right search terms. I wanted to see if anyone can tell me how to add additional fields to the popup bubble that appears when clicking on a marker. Currently I have it set to display the title, but I'd also like for it to show the address field from the location module and a custom field I have defined for Website URL. The crazy thing is I have successfully done this same thing before on another site, but I cannot remember how I did it. I'm not seeing a setting in Views to change this. The setting where I have title defined is a dropdown that doesn't allow me to select multiple options. Thanks in advance for any assistance you can provide.

Comments

wildlife’s picture

I figured it out. I just picked the last field that I wanted to display in the popup bubble and rewrote the results to include all the other fields I wanted, then used that last field as the single field to display in the popup bubble.

denial’s picture

Status: Active » Closed (works as designed)

Just to wrap this up: wildlife was right, this can be achieved like this in Views:

  1. Choose GMap under format
  2. under display, choose Fields
  3. add the fields you want to display in the popup bubble, e.g. Content: title, content: location, content: body
  4. Select the last field and expand the rewrite results-option.
  5. tick the rewrite results of this field box.
  6. Under "Replacement patterns", you can find the tokens available for rewriting your results. Use these to write your results, e.g.
    <h2>[title]</h2>
    [body]
    [field_location]
  7. Hit apply, and under format > Gmap > settings, make sure location.module is the datasource and select "Display a popup bubble with additional information when a marker is clicked.". Choose the field you've chosen to rewrite in the dropdown.
  8. Hit apply and save the view, all set!