0

I am using the facets module to add filter blocks in my view.

I have a list field wich contains

FR|France

IT|Italy

My dropdown list of facet display values (fr, it)

I want to display (France, Italy)

How can I do that?

Thank you

  • Something preventing changing the keys from FR IT to France Italy ? – dharma May 2 '18 at 14:30
  • it's a very long list :) – A.Sana May 2 '18 at 15:44
0

try in search API > your index > search your field and then in the column type, select STRING.

Also maybe you can hook your field:

function HOOK_facet_items_alter(&$build, &$settings) {
   if ($settings->facet == "YOUR_FACET_NAME") {
       foreach($build as $key => $item) {
          $build[$key]["#markup"] = drupal_strtoupper($item["#markup"]);
        }
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.