I have a problem with displaying UK county fields correctly - this is the province field. In a node when location information is attached it will display as the three letter abbreviation DBY for Derbyshire for example.
If I create a view and add the province field it will show the full county name without any problem.
I've seen related posts on this issue but they don't cover this issue.
What field is being shown in the view? If I could find out I could create a custom node template for my nodes.

Any further information appreciated.

regards.

Mark

Comments

Anonymous’s picture

Has anyone got any further information on this issue?

Mark

Anonymous’s picture

Has anyone got any further information about this at all?

Mark

NikLP’s picture

Mark, this sounds like a theming issue - you're saying that the View display is different than the node display.

I suggest that you use the Views Theming wizard to show what fields are being used in your view, and the devel module's node render tab (via the node view) to show what the node display is rendering - perhaps then you can answer your own question; it would appear that the data is there, but different "folks" are using different bits of it for different things...

HTH

Anonymous’s picture

This is just what I needed. I can now see that the Province field is overridden by the phptemplate_views_handle_field_location_province function in my view. So if I can get that into my node view the problem is solved.

Thanks,

Mark

catch’s picture

Title: Issue with Province - UK county - different display in view and node » Use full name by default or per country
Category: support » feature
catch’s picture

Title: Use full name by default or per country » Use full province name by default, or per country

ack.

scott.mclewin’s picture

subscribing. Showing full province names would be a most helpful fix. Also, feeding the full province name into the Drupal search indexer rather than the province code would be beneficial.

catch’s picture

Status: Active » Closed (duplicate)

Actually, this is the duplicate, and it's not only a theme issue.

koredeola’s picture

this is one solution that i have used
assuming you already have the information you need from a query in the variable $locations_and_counts


                            //We need to call the some location functions to get out the actual province
						foreach($locations_and_counts as $key => $value){
                            //this location function loads an .inc from the supported folder depending on the value of $value->country
							if(location_load_country($value->country)){
								//you now need to return an area containing the information you need
								$func = 'location_province_list_'. $value->country;
								//note that $func contains the variable function name
							    if(is_array($func())){
									$province = $func();
									$province_text_value = $province[$value->province];
								}
							}
							$events_by_location .= '<li>· ' . l( $province_text_value, '#') . ' (' . $value->count . ')</li>';
						}