Hi, what is the easiest/quickest way to read the 'pretty path alias' setting?

We have an issue over at Search API ranges, and this is what we came up with:
http://drupal.org/node/1511144#comment-6310144

$facet_current =$this->facet->getFacet();
 $facet_adapter = $this->facet->getAdapter();
 $facet_settings_global = $facet_adapter->getFacetSettingsGlobal($facet_current);
  $facet_settings_global = (array)$facet_settings_global;
  $facet_pretty_path_alias = $facet_settings_global['settings']['pretty_paths_alias'];

Seems a bit complex.

Maybe we can add a simpler function like '$this->facet->getFacetPathAlias()' ? Any ideas?

Comments

dasjo’s picture

from facetapi_pretty_paths_form_facetapi_facet_display_form_alter

  // Get global facet settings.
  $adapter = $form['#facetapi']['adapter'];
  $processor = new FacetapiUrlProcessorPrettyPaths($adapter);
  $pretty_paths_alias = $processor->getFacetPrettyPathsAlias($form['#facetapi']['facet']);

does this help?

Anonymous’s picture

Status: Active » Fixed

Thanks, will go with this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

DYdave’s picture

Status: Closed (fixed) » Active

Hi morningtime and dasjo,

I'm afraid, we haven't found a proper solution for fixing this issue.
It's closely related with:
http://drupal.org/node/1741434
http://drupal.org/node/1764886

We're not going to get through with this unless we're able to find a proper solution coming from Facetapi or Facetapi pretty paths.
So far, our attempts in search_api_sorts to integrate with Facet API Pretty Paths have failed since we're unable to get the proper part of the URL.
Most likely we're going to have to investigate in this module in order to move forward on this.

Could you please let me know your thoughts on this issue and how we could possibly help?

Thanks in advance.

dasjo’s picture

Status: Active » Closed (fixed)