Hi All,

using Simple address module, I would like to modify the order of fields, when they are displayed on the web page.
The address is currently displayed as follow :

<div property="schema:location" class="field field--name-field-adresse field--type-simpleaddress field--label-hidden field__item">
  <div class="addressfield">
    <div itemscope itemtype="http://schema.org/PostalAddress">
      <span itemprop="streetAddress">27 Avenue François Mitterrand</span>
      <span itemprop="addressLocality">Créteil</span>
      <span itemprop="addressRegion"></span>
      <span itemprop="postOfficeBoxNumber"></span>
      <span itemprop="postalCode">94000</span>
      <span itemprop="addressCountry">France</span>
    </div>
  </div>
</div>

I would prefer :

<div property="schema:location" class="field field--name-field-adresse field--type-simpleaddress field--label-hidden field__item">
  <div class="addressfield">
    <div itemscope itemtype="http://schema.org/PostalAddress">
      <span itemprop="streetAddress">27 Avenue François Mitterrand</span>
     <span itemprop="postalCode">94000</span>
      <span itemprop="addressLocality">Créteil</span>
      <span itemprop="addressRegion"></span>
      <span itemprop="postOfficeBoxNumber"></span>
      <span itemprop="addressCountry">France</span>
    </div>
  </div>
</div>

How can I do ?

Thanks for your help.

Cheers

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fred@familleloup.com created an issue. See original summary.

fred@familleloup.com’s picture

Issue summary: View changes
fred@familleloup.com’s picture

I succéder in doing this. I modified the SimpleAddressDefaultFormatter.php file.
I created the individual variables and concanate them in the desired order.
My version attached (PHP file with extension.
Cheers

fred@familleloup.com’s picture

Assigned: Unassigned » fred@familleloup.com