I am using view.
Every view needs path and i want to set that path to my base url.
For example i want to make a view which will take a Car as a argument and show result at
www.example.com/Car
Any help will be appreciated.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI am using view.
Every view needs path and i want to set that path to my base url.
For example i want to make a view which will take a Car as a argument and show result at
www.example.com/Car
Any help will be appreciated.
I think what you are looking for is contextual filters
.
You should add a contextual filter
to your view and set the path to %
.
What kind of filter you should use depends on if Car
a taxonomy term or a node and so on.
In the following example I have set my path to stores/%
and a store
is a node with a associated taxonomy term. I can display stores marked with a specific term by going to http://example.com/stores/england
or http://example.com/stores/sweden
.
contextual filters
under the advanced tab
.Term ID
.* EDIT * Perhaps this link will help you Views contextual filters taxonomy name
To expand upon Krister Andersson's answer...
When creating a view, and defining its path keep in mind that the path you are defining is basically the name of the path. IF you have a % in the path then th view has multiple names. If you define its path as cars/%, for instance, the view is called for any combination of path components in the % segment. If you had a view with the path /% it would basically be called for all URLS. This does not work for Drupal so wildcards are not used in the first position.