I'm using the field-location token in pathauto. The token [node:field_location] prints the entire contents of the location field, including "see-map-google-maps". How do I get rid of the "see-map-google-maps" portion for the token value? (I do want the map link to print in the node, just not in the url.)

Comments

hellomobe’s picture

The cck location token functions in the location_cck.module D7 are deprecated and have no effect on tokens for a location cck field.

I ended up hacking core (very bad) since I don't understand how to implement token_replace() to integrate with this module -- does anyone know how to do this...would be grateful for an example to fix it correctly.

in core/includes/token.inc replace

 return str_replace($tokens, $values, $text);

with

 return str_replace('-see-map-google-maps','',str_replace($tokens, $values, $text));
legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing support tickets that have been inactive for over a year to clean up the issue queue. Please reopen if this is still an issue.