Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The core Drupal search engine strips all tags out of the node's output and then indexes all of the words. WIth most content this works fine, but with standard formatting of addresses this gets tricky as several important fields are usually not displayed, specifically the province's full name and the country code. What I suggest is adjusting the standard location.tpl.php to add these fields in a hidden div.
Comment | File | Size | Author |
---|---|---|---|
#14 | location-extra-fields-in-template-896384-10-D6.patch | 1.04 KB | jwilson3 |
#9 | Location_add_extra_fields_template_896384_9.patch | 801 bytes | Yurii Krysiuk |
#8 | Location_add_extra_fields_template.patch | 0 bytes | Yurii Krysiuk |
#2 | location-n896384-2.patch | 699 bytes | DamienMcKenna |
#1 | location-n896384.patch | 1.15 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaHere's a patch that adds the $province_name and (uppercased) $country code to the standard template file. Note that because the default core Search module's settings exclude two-letter words many people will not see relevance from the country code, but it will be useful for some use cases.
This patch sponsored by Bluespark Labs.
Comment #2
DamienMcKennaUpdated patch that now uses an inline style definition to hide the output rather than placing it in location.css, which is not loaded most of the time.
Comment #3
podarokall feature requests should be rolled against latest 7.x-3.x-dev and after commit can be backported to 6.x branch
Comment #5
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedUpdate and fix patch file
Comment #6
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentededit patch file
Comment #7
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedComment #8
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedCreated new patch file
Comment #9
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedAdded new patch file
Comment #10
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedComment #11
podarokthanks, commited
Comment #14
jwilson3Can this be backported to D6?
Comment #15
legolasboClosing old D6 issues as D6 is end of life