Mohit Gupta
Mohit Gupta

Reputation: 727

SEO Friendly exposed filter view Drupal 7

Currently url display like this news/?tid=telecom

I need to alias news/telecom using clean URL its works in all pages but in view exposed filters not worked

Upvotes: 2

Views: 1857

Answers (2)

Mudassar Ali Sahil
Mudassar Ali Sahil

Reputation: 554

You can also solve it using contextual filter. You can use taxonomy term names with this filter by adjusting Specify validation criteria settings. please see this answer Drupal 7 views contextual filters taxonomy name

Currently, it's my belief that the only generic way to solve this issue is either manipulating the URLs at the httpd layer, or using hook_url_inbound_alter and hook_url_outbound_alter. You can read a bit more about the mentioned hooks at this question.

However, if I were to give this another shoot myself, I would attempt a Views specific solution instead, as this problem is common enough that it could be justified to have a module for this.

In hook_views_pre_build, one could take data from a url like "members/valuea/valueb", push these values into $_GET['q'], let views build it's query seeing the get arguments "in the url", then possibly remove them again in hook_views_post_build.

I hope this will help you.

Upvotes: 1

Mervyn
Mervyn

Reputation: 61

Have you tried views contextual filters to solve your problem?

Upvotes: 1

Related Questions