User login

Two unsatisfying routes to manipulating presentation of addressfield output

[Status: No clean, lightweight solution to munging addressfields for loading elsewhere on the page. The current solution (waaaay at the bottom) splits the difference, in an almost certainly pointless compromise, but that's what happens when trying two different approaches-- you don't finish either of them. But each route looked so bad, once i got a good look, i figured the other had to be better. Now leaning toward my first instinct of loading the field with field_view_field() but i doubt that makes sense for anything but addressfields when your needs are simple.]

You would think that

<?php
       
// Show the Locality, Country.
       
$page['subtitle'] = field_view_field('node', $node, 'field_address', 'full');
?>

Replacing

<?php
       
// Show the Locality, Country.
       
$location = array();
        if (!empty(
$node->field_address['und']['0']['locality'])) {
         
$location[] = check_plain($node->field_address['und']['0']['locality']);
        }
       
// Show the Country.
       
if (!empty($node->field_address['und']['0']['country'])) {
print
$node->field_address['und']['0']['country'];
         
// Get list codes with full country names.
         
$countries = country_get_list();
         
// If US, change the country to the State.
         
if ($node->field_address['und']['0']['country'] == 'US') {
           
$node->field_address['und']['0']['country'] = $node->field_address['und']['0']['administrative_area'];
          }
         
// Otherwise, change the country code to the full name.
         
else {
           
$node->field_address['und']['0']['country'] = $countries[$node->field_address['und']['0']['country']];
          }
         
$location[] = check_plain($node->field_address['und']['0']['country']);
        }
        if (!empty(
$location)) {
         
$page['subtitle']['#markup'] = implode(', ', $location);
        }
        break;
?>

is better, and more Drupal, would you not?

Maybe more the Drupal way.... but not better. (Or actually, maybe it is)

Even before having to add a little code (which i didn't get working...) to remove unwanted parts of the field, the amount loaded within the field was ridiculous, copying in the entire node object and all the other fields and all kinds of metadata about every address locality ever.

<?php
       
// Show the Locality, Country.
       
$page['subtitle'] = field_view_field('node', $node, 'field_address', 'full');
       
// extra line that didn't seem to work anyway
       
$page['subtitle']['#items'][0]['#address']['premise'] = '';
?>

There needs to be a caching system for the rendered value of fields because loading all this, or repeating all the code for rendering like running country or state codes through functions to get their full name, is ridiculous.

Bloody look at this data that Drupal regurgitates for one little field:

Array
(
    [#theme] => field
    [#weight] => 1
    [#title] => Location
    [#access] => 1
    [#label_display] => above
    [#view_mode] => full
    [#language] => und
    [#field_name] => field_address
    [#field_type] => addressfield
    [#field_translatable] => 1
    [#entity_type] => node
    [#bundle] => project
    [#object] => stdClass Object
        (
            [vid] => 1079
            [uid] => 3
            [title] => The Ascent at Roebling's Bridge
            [log] =>
            [status] => 1
            [comment] => 0
            [promote] => 1
            [sticky] => 0
            [ds_switch] =>
            [nid] => 307
            [type] => project
            [language] => und
            [created] => 1179737862
            [changed] => 1314917728
            [tnid] => 0
            [translate] => 0
            [revision_timestamp] => 1314917728
            [revision_uid] => 0
            [body] => Array
                (
                    [und] => Array
                        (
                            [0] => Array
                                (
                                    [value] => The Ascent at Roebling’s Bridge in Covington, Kentucky, is a 20-story residential tower that was completed in 2008. Reaching 300 feet at its pinnacle, the 300,000-square-foot building includes 70 residential units, a swimming pool, garden facilities, large public event space, and a restaurant on the plaza level. The Ascent at Roebling’s Bridge was awarded a CNBC Americas Property Award for Best High-Rise Development in 2008.

Its curving crescent form and sloping roof line are designed to maximize views, resulting in unobstructed visibility of the Cincinnati skyline from every unit. The ascending height of the building mimics the suspension cables of the nearby Roebling’s Bridge, a central feature of Covington’s waterfront and links the low horizon of residential structures to the east with the more modern commercial buildings to the west.
                                    [summary] =>
                                    [format] => full_html
                                    [safe_value] =>  

The Ascent at Roebling’s Bridge in Covington, Kentucky, is a 20-story residential tower that was completed in 2008. Reaching 300 feet at its pinnacle, the 300,000-square-foot building includes 70 residential units, a swimming pool, garden facilities, large public event space, and a restaurant on the plaza level. The Ascent at Roebling’s Bridge was awarded a CNBC Americas Property Award for Best High-Rise Development in 2008.

Its curving crescent form and sloping roof line are designed to maximize views, resulting in unobstructed visibility of the Cincinnati skyline from every unit. The ascending height of the building mimics the suspension cables of the nearby Roebling’s Bridge, a central feature of Covington’s waterfront and links the low horizon of residential structures to the east with the more modern commercial buildings to the west.

[safe_summary] => ) ) ) [field_address] => Array ( [und] => Array ( [0] => Array ( [country] => US [administrative_area] => KY [sub_administrative_area] => [locality] => Covington [dependent_locality] => [postal_code] => 41011 [thoroughfare] => [premise] => 1 Roebling Way [sub_premise] => [organisation_name] => [name_line] => [first_name] => [last_name] => [data] => ) ) ) [field_civil_engineer] => Array ( ) [field_client] => Array ( [und] => Array ( [0] => Array ( [url] => http://www.yourascent.com/ [title] => Corporex [attributes] => Array ( ) [display_url] => http://www.yourascent.com/ ) ) ) [field_client_address] => Array ( ) [field_completion_date] => Array ( [und] => Array ( [0] => Array ( [value] => 2008-01-01T00:00:00 [timezone] => America/New_York [timezone_db] => America/New_York [date_type] => date ) ) ) [field_cost_control] => Array ( ) [field_electrical_systems] => Array ( ) [field_facade] => Array ( ) [field_fax] => Array ( ) [field_image] => Array ( [und] => Array ( [0] => Array ( [fid] => 1023 [title] => [data] => [file] => stdClass Object ( [fid] => 1023 [uid] => 6 [filename] => Key The Ascent at Roeblings Bridge.jpg [uri] => public://Key The Ascent at Roeblings Bridge.jpg [filemime] => image/jpeg [filesize] => 119641 [status] => 1 [timestamp] => 1314917723 [type] => image [field_credits] => Array ( [und] => Array ( [0] => Array ( [value] => [format] => [safe_value] => ) ) ) [group_audience] => Array ( ) [field_alt] => Array ( [und] => Array ( [0] => Array ( [value] => Key The Ascent at Roeblings Bridge [format] => [safe_value] => Key The Ascent at Roeblings Bridge ) ) ) [field_weight] => Array ( [und] => Array ( [0] => Array ( [value] => 0 ) ) ) [field_image_types] => Array ( ) [field_caption] => Array ( ) [rdf_mapping] => Array ( ) ) ) ) ) [field_landscape_architect] => Array ( ) [field_lighting_designer] => Array ( ) [field_mechanical_systems] => Array ( ) [field_mep_engineer] => Array ( [und] => Array ( [0] => Array ( [value] => KLH Engineering [format] => [safe_value] => KLH Engineering ) ) ) [field_other_building_details] => Array ( ) [field_phone] => Array ( ) [field_raw_construction] => Array ( ) [field_starting_date] => Array ( ) [field_status] => Array ( [und] => Array ( [0] => Array ( [tid] => 11 [taxonomy_term] => stdClass Object ( [tid] => 11 [vid] => 4 [name] => Completed [description] => [format] => [weight] => 0 [vocabulary_machine_name] => status [rdf_mapping] => Array ( [rdftype] => Array ( [0] => skos:Concept ) [name] => Array ( [predicates] => Array ( [0] => rdfs:label [1] => skos:prefLabel ) ) [description] => Array ( [predicates] => Array ( [0] => skos:definition ) ) [vid] => Array ( [predicates] => Array ( [0] => skos:inScheme ) [type] => rel ) [parent] => Array ( [predicates] => Array ( [0] => skos:broader ) [type] => rel ) ) ) ) ) ) [field_structural_engineer] => Array ( [und] => Array ( [0] => Array ( [value] => THP Limited [format] => [safe_value] => THP Limited ) ) ) [field_structure] => Array ( [und] => Array ( [0] => Array ( [value] => Concrete structure with glass curtain wall cladding [format] => [safe_value] => Concrete structure with glass curtain wall cladding ) ) ) [field_type] => Array ( [und] => Array ( [0] => Array ( [tid] => 5 ) [1] => Array ( [tid] => 22 ) ) ) [field_windows] => Array ( ) [field_construction_budget] => Array ( ) [field_additional_credits] => Array ( [und] => Array ( [0] => Array ( [label] => Contractor [value] => Dugan & Meyers Construction [safe_value] => Dugan & Meyers Construction ) ) ) [field_building_size] => Array ( [und] => Array ( [0] => Array ( [value] => 310000 [units] => sq.ft ) [1] => Array ( [value] => 300 [units] => Ft.(Height) ) [2] => Array ( [value] => 22 [units] => Floors ) [3] => Array ( [value] => 70 [units] => Units ) ) ) [field_construction_cost] => Array ( ) [field_notes] => Array ( [und] => Array ( [0] => Array ( [value] => Category: Completed Client: Corporex Description long text: Sizes of the units range between 950 and 7,000 square feet, with most being around 2,000 square feet. In addition to the residential units, the building will include a swimming pool, child play area, garden facilities, guest houses, a large public event space, and possibly a restaurant on the plaza level. Through the vertical, non-repeating articulation of the facade, the building breaks from the repetitive, horizontal orientation of typical high-rise building. Its multiple layers blur the distinction between interior and exterior, both visually and experientially. This texture functions also to provide shade to all units from the east sun. Studio Daniel Libeskind is collaborating on this project with Cincinnati-based GBBN Architects. Abstract: The Ascent at Roebling's Bridge in Covington, on a site next to the Roebling Suspension Bridge on the Ohio River waterfront, provides a dynamic addition to the skyline of the greater Cincinnati area, being a dramatic departure from the surrounding waterfront buildings. Abstract2: The Ascent at Roebling's Bridge in Covington, Kentucky provides a dynamic addition to the skyline of the greater Cincinnati area, being a dramatic departure from the surrounding waterfront buildings. Date, completion: 2008 Address flag: 3 Tech info: Building Area: 310,000 sq.ft. Height: 300 ft. Number of Floors: 22 Stories (including one lobby, secure parking level, amenities level and 19 floors of luxury condominiums) Number of Units: 70 Structure: Concrete structure with glass curtain wall cladding Credits: Architect of Record: GBBN Architects Contractor: Dugan & Meyers Construction Structural Engineer: THP Limited Mechanical Engineer: KLH Engineering Photo Credits: ©SDL: Image 1 ©Michele Nastasi: Images 2-5, 15 ©Corporex: Images 6, 8-14 ©Bitter Bredt Fotografie: Image 7 Location: Covington, Kentucky Formatted address: 1 Roebling Way Covington, Kentucky 41011 Country: United States Commission: 2004 Media file path: CNBC_glow___c__Michele_Nastasi_copy.jpg [format] => [safe_value] => Category: Completed Client: Corporex Description long text: Sizes of the units range between 950 and 7,000 square feet, with most being around 2,000 square feet. In addition to the residential units, the building will include a swimming pool, child play area, garden facilities, guest houses, a large public event space, and possibly a restaurant on the plaza level. Through the vertical, non-repeating articulation of the facade, the building breaks from the repetitive, horizontal orientation of typical high-rise building. Its multiple layers blur the distinction between interior and exterior, both visually and experientially. This texture functions also to provide shade to all units from the east sun. Studio Daniel Libeskind is collaborating on this project with Cincinnati-based GBBN Architects. Abstract: The Ascent at Roebling's Bridge in Covington, on a site next to the Roebling Suspension Bridge on the Ohio River waterfront, provides a dynamic addition to the skyline of the greater Cincinnati area, being a dramatic departure from the surrounding waterfront buildings. Abstract2: The Ascent at Roebling's Bridge in Covington, Kentucky provides a dynamic addition to the skyline of the greater Cincinnati area, being a dramatic departure from the surrounding waterfront buildings. Date, completion: 2008 Address flag: 3 Tech info: <i>Building Area</i>: 310,000 sq.ft. <i>Height</i>: 300 ft. <i>Number of Floors</i>: 22 Stories (including one lobby, secure parking level, amenities level and 19 floors of luxury condominiums) <i>Number of Units</i>: 70 <i>Structure</i>: Concrete structure with glass curtain wall cladding Credits: <i>Architect of Record</i>: GBBN Architects <i>Contractor</i>: Dugan & Meyers Construction </i>Structural Engineer</i>: THP Limited <i>Mechanical Engineer</i>: KLH Engineering <b>Photo Credits</b>: ©SDL: Image 1 ©Michele Nastasi: Images 2-5, 15 ©Corporex: Images 6, 8-14 ©Bitter Bredt Fotografie: Image 7 Location: Covington, Kentucky Formatted address: 1 Roebling Way Covington, Kentucky 41011 Country: United States Commission: 2004 Media file path: CNBC_glow___c__Michele_Nastasi_copy.jpg ) ) ) [field_partner] => Array ( [und] => Array ( [0] => Array ( [url] => [title] => GBBN Architects [attributes] => Array ( [label] => Architect of Record ) [display_url] => http://sdl.localhost/ ) ) ) [field_total_budget] => Array ( ) [field_total_cost] => Array ( ) [group_group] => Array ( [und] => Array ( [0] => Array ( [value] => 1 ) ) ) [rdf_mapping] => Array ( [rdftype] => Array ( [0] => sioc:Item [1] => foaf:Document ) [title] => Array ( [predicates] => Array ( [0] => dc:title ) ) [created] => Array ( [predicates] => Array ( [0] => dc:date [1] => dc:created ) [datatype] => xsd:dateTime [callback] => date_iso8601 ) [changed] => Array ( [predicates] => Array ( [0] => dc:modified ) [datatype] => xsd:dateTime [callback] => date_iso8601 ) [body] => Array ( [predicates] => Array ( [0] => content:encoded ) ) [uid] => Array ( [predicates] => Array ( [0] => sioc:has_creator ) [type] => rel ) [name] => Array ( [predicates] => Array ( [0] => foaf:name ) ) [comment_count] => Array ( [predicates] => Array ( [0] => sioc:num_replies ) [datatype] => xsd:integer ) [last_activity] => Array ( [predicates] => Array ( [0] => sioc:last_activity_date ) [datatype] => xsd:dateTime [callback] => date_iso8601 ) ) [print_display] => 1 [print_display_comment] => 0 [print_display_urllist] => 1 [name] => Administrator [picture] => 0 [data] => b:0; [uri] => Array ( [path] => node/307 [options] => Array ( [entity_type] => node [entity] => stdClass Object *RECURSION* ) ) [entity_view_prepared] => 1 [menu] => Array ( [link_title] => [mlid] => 0 [plid] => 0 [menu_name] => main-menu [weight] => 0 [options] => Array ( ) [module] => menu [expanded] => 0 [hidden] => 0 [has_children] => 0 [customized] => 0 [parent_depth_limit] => 8 ) ) [#items] => Array ( [0] => Array ( [country] => US [administrative_area] => KY [sub_administrative_area] => [locality] => Covington [dependent_locality] => [postal_code] => 41011 [thoroughfare] => [premise] => 1 Roebling Way [sub_premise] => [organisation_name] => [name_line] => [first_name] => [last_name] => [data] => [#address] => Array ( [premise] => ) ) ) [#formatter] => addressfield_default [0] => Array ( [#handlers] => Array ( [address] => address [name-full] => 0 [name-oneline] => 0 [organisation] => 0 ) [street_block] => Array ( [#type] => addressfield_container [#attributes] => Array ( [class] => Array ( [0] => street-block ) ) [#weight] => 0 [thoroughfare] => Array ( [#title] => Address 1 [#tag] => div [#attributes] => Array ( [class] => Array ( [0] => thoroughfare ) ) [#size] => 30 [#required] => 1 ) [premise] => Array ( [#title] => Address 2 [#tag] => div [#attributes] => Array ( [class] => Array ( [0] => premise ) ) [#size] => 30 ) ) [locality_block] => Array ( [#type] => addressfield_container [#attributes] => Array ( [class] => Array ( [0] => addressfield-container-inline [1] => locality-block ) ) [#weight] => 50 [#attached] => Array ( [css] => Array ( [0] => sites/all/modules/contrib/addressfield/addressfield.css ) ) [locality] => Array ( [#title] => City [#size] => 30 [#required] => 1 [#attributes] => Array ( [class] => Array ( [0] => locality ) ) ) [administrative_area] => Array ( [#title] => State [#size] => 10 [#required] => 1 [#prefix] => [#attributes] => Array ( [class] => Array ( [0] => state ) ) [#options] => Array ( [] => -- [AL] => Alabama [AK] => Alaska [AZ] => Arizona [AR] => Arkansas [CA] => California [CO] => Colorado [CT] => Connecticut [DE] => Delaware [DC] => District Of Columbia [FL] => Florida [GA] => Georgia [HI] => Hawaii [ID] => Idaho [IL] => Illinois [IN] => Indiana [IA] => Iowa [KS] => Kansas [KY] => Kentucky [LA] => Louisiana [ME] => Maine [MD] => Maryland [MA] => Massachusetts [MI] => Michigan [MN] => Minnesota [MS] => Mississippi [MO] => Missouri [MT] => Montana [NE] => Nebraska [NV] => Nevada [NH] => New Hampshire [NJ] => New Jersey [NM] => New Mexico [NY] => New York [NC] => North Carolina [ND] => North Dakota [OH] => Ohio [OK] => Oklahoma [OR] => Oregon [PA] => Pennsylvania [RI] => Rhode Island [SC] => South Carolina [SD] => South Dakota [TN] => Tennessee [TX] => Texas [UT] => Utah [VT] => Vermont [VA] => Virginia [WA] => Washington [WV] => West Virginia [WI] => Wisconsin [WY] => Wyoming [ ] => -- [AS] => American Samoa [FM] => Federated States of Micronesia [GU] => Guam [MH] => Marshall Islands [MP] => Northern Mariana Islands [PW] => Palau [PR] => Puerto Rico [VI] => Virgin Islands ) ) [postal_code] => Array ( [#title] => ZIP Code [#size] => 10 [#required] => 1 [#attributes] => Array ( [class] => Array ( [0] => postal-code ) ) [#prefix] => ) ) [country] => Array ( [#title] => Country [#options] => Array ( [] => - No address - [AF] => Afghanistan [AX] => Aland Islands [AL] => Albania [DZ] => Algeria [AS] => American Samoa [AD] => Andorra [AO] => Angola [AI] => Anguilla [AQ] => Antarctica [AG] => Antigua and Barbuda [AR] => Argentina [AM] => Armenia [AW] => Aruba [AU] => Australia [AT] => Austria [AZ] => Azerbaijan [BS] => Bahamas [BH] => Bahrain [BD] => Bangladesh [BB] => Barbados [BY] => Belarus [BE] => Belgium [BZ] => Belize [BJ] => Benin [BM] => Bermuda [BT] => Bhutan [BO] => Bolivia [BA] => Bosnia and Herzegovina [BW] => Botswana [BV] => Bouvet Island [BR] => Brazil [IO] => British Indian Ocean Territory [VG] => British Virgin Islands [BN] => Brunei [BG] => Bulgaria [BF] => Burkina Faso [BI] => Burundi [KH] => Cambodia [CM] => Cameroon [CA] => Canada [CV] => Cape Verde [KY] => Cayman Islands [CF] => Central African Republic [TD] => Chad [CL] => Chile [CN] => China [CX] => Christmas Island [CC] => Cocos (Keeling) Islands [CO] => Colombia [KM] => Comoros [CG] => Congo (Brazzaville) [CD] => Congo (Kinshasa) [CK] => Cook Islands [CR] => Costa Rica [HR] => Croatia [CU] => Cuba [CY] => Cyprus [CZ] => Czech Republic [DK] => Denmark [DJ] => Djibouti [DM] => Dominica [DO] => Dominican Republic [EC] => Ecuador [EG] => Egypt [SV] => El Salvador [GQ] => Equatorial Guinea [ER] => Eritrea [EE] => Estonia [ET] => Ethiopia [FK] => Falkland Islands [FO] => Faroe Islands [FJ] => Fiji [FI] => Finland [FR] => France [GF] => French Guiana [PF] => French Polynesia [TF] => French Southern Territories [GA] => Gabon [GM] => Gambia [GE] => Georgia [DE] => Germany [GH] => Ghana [GI] => Gibraltar [GR] => Greece [GL] => Greenland [GD] => Grenada [GP] => Guadeloupe [GU] => Guam [GT] => Guatemala [GG] => Guernsey [GN] => Guinea [GW] => Guinea-Bissau [GY] => Guyana [HT] => Haiti [HM] => Heard Island and McDonald Islands [HN] => Honduras [HK] => Hong Kong S.A.R., China [HU] => Hungary [IS] => Iceland [IN] => India [ID] => Indonesia [IR] => Iran [IQ] => Iraq [IE] => Ireland [IM] => Isle of Man [IL] => Israel [IT] => Italy [CI] => Ivory Coast [JM] => Jamaica [JP] => Japan [JE] => Jersey [JO] => Jordan [KZ] => Kazakhstan [KE] => Kenya [KI] => Kiribati [KW] => Kuwait [KG] => Kyrgyzstan [LA] => Laos [LV] => Latvia [LB] => Lebanon [LS] => Lesotho [LR] => Liberia [LY] => Libya [LI] => Liechtenstein [LT] => Lithuania [LU] => Luxembourg [MO] => Macao S.A.R., China [MK] => Macedonia [MG] => Madagascar [MW] => Malawi [MY] => Malaysia [MV] => Maldives [ML] => Mali [MT] => Malta [MH] => Marshall Islands [MQ] => Martinique [MR] => Mauritania [MU] => Mauritius [YT] => Mayotte [MX] => Mexico [FM] => Micronesia [MD] => Moldova [MC] => Monaco [MN] => Mongolia [ME] => Montenegro [MS] => Montserrat [MA] => Morocco [MZ] => Mozambique [MM] => Myanmar [NA] => Namibia [NR] => Nauru [NP] => Nepal [NL] => Netherlands [AN] => Netherlands Antilles [NC] => New Caledonia [NZ] => New Zealand [NI] => Nicaragua [NE] => Niger [NG] => Nigeria [NU] => Niue [NF] => Norfolk Island [MP] => Northern Mariana Islands [KP] => North Korea [NO] => Norway [OM] => Oman [PK] => Pakistan [PW] => Palau [PS] => Palestinian Territory [PA] => Panama [PG] => Papua New Guinea [PY] => Paraguay [PE] => Peru [PH] => Philippines [PN] => Pitcairn [PL] => Poland [PT] => Portugal [PR] => Puerto Rico [QA] => Qatar [RE] => Reunion [RO] => Romania [RU] => Russia [RW] => Rwanda [BL] => Saint Barthélemy [SH] => Saint Helena [KN] => Saint Kitts and Nevis [LC] => Saint Lucia [MF] => Saint Martin (French part) [PM] => Saint Pierre and Miquelon [VC] => Saint Vincent and the Grenadines [WS] => Samoa [SM] => San Marino [ST] => Sao Tome and Principe [SA] => Saudi Arabia [SN] => Senegal [RS] => Serbia [SC] => Seychelles [SL] => Sierra Leone [SG] => Singapore [SK] => Slovakia [SI] => Slovenia [SB] => Solomon Islands [SO] => Somalia [ZA] => South Africa [GS] => South Georgia and the South Sandwich Islands [KR] => South Korea [ES] => Spain [LK] => Sri Lanka [SD] => Sudan [SR] => Suriname [SJ] => Svalbard and Jan Mayen [SZ] => Swaziland [SE] => Sweden [CH] => Switzerland [SY] => Syria [TW] => Taiwan [TJ] => Tajikistan [TZ] => Tanzania [TH] => Thailand [TL] => Timor-Leste [TG] => Togo [TK] => Tokelau [TO] => Tonga [TT] => Trinidad and Tobago [TN] => Tunisia [TR] => Turkey [TM] => Turkmenistan [TC] => Turks and Caicos Islands [TV] => Tuvalu [VI] => U.S. Virgin Islands [UG] => Uganda [UA] => Ukraine [AE] => United Arab Emirates [GB] => United Kingdom [US] => United States [UM] => United States Minor Outlying Islands [UY] => Uruguay [UZ] => Uzbekistan [VU] => Vanuatu [VA] => Vatican [VE] => Venezuela [VN] => Vietnam [WF] => Wallis and Futuna [EH] => Western Sahara [YE] => Yemen [ZM] => Zambia [ZW] => Zimbabwe ) [#required] => 1 [#attributes] => Array ( [class] => Array ( [0] => country ) ) [#weight] => 100 ) [#address] => Array ( [country] => US [administrative_area] => KY [sub_administrative_area] => [locality] => Covington [dependent_locality] => [postal_code] => 41011 [thoroughfare] => [premise] => 1 Roebling Way [sub_premise] => [organisation_name] => [name_line] => [first_name] => [last_name] => [data] => ) [#pre_render] => Array ( [0] => addressfield_render_address ) ) ) in issy_page_alter() (line 110 of /home/ben/code/sdl/web/sites/all/themes/issy/template.php).

Comments

Couldn't agree more. It's

Couldn't agree more. It's frustrating. Also trying to figure out the nice drupal way to format the addressfield. I know there is something with field formatters. Have you made any progress on this since this post?

Thanks for this

Your tutorial is much appreciated. I've been working on this problem for hours and you saved my day...thanks again.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.