Since much of the purpose of providing pretty facet paths is for SEO, the urls should be canonicalized as much as possible.

This could be achieved by sorting the active segments within postProcessItem before the segments are looped over to construct the path:

    // Construct facet path after gathering all active segments.
    // @todo: sort to avoid multiple urls with duplicate content?
    foreach ($segments as $key => $segment) {
      $item['#path'] .=  '/' . $segment['alias'] . '/' . $segment['value'];
    }

Comments

vrc3’s picture

Title: Make faceted urls unique » Make pretty paths unique
dasjo’s picture

Version: » 7.x-1.x-dev
Priority: Major » Normal
Status: Active » Fixed

implemented, see


  protected function constructPath($basePath, array $segments) {
    // Sort to avoid multiple urls with duplicate content.
    ksort($segments);
    $path = $basePath;
    foreach ($segments as $key => $segment) {
      $this->encodePathSegment($segment);
      $path .=  '/' . $segment['alias'] . '/' . $segment['value'];
    }
    return $path;
  }

Status: Fixed » Closed (fixed)

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