开发者

How to customize a view in Drupal 7 using wildcard for the URL

I'm using "views" to customize the output of every single blog page. I know I need some kind of wildcard. I am also using clean URLS but am unsure if a wildcard can be used on an alias. 开发者_StackOverflow中文版

There is only 1 user who will be posting blogs.

Using an alias I would like to apply this custom view to every page under this URL: http://www.esselaw.com/blogs/

For example: http://www.esselaw.com/blogs/blog-entry1 & http://www.esselaw.com/blogs/blog-entery2 and so on.

Since there are other pages that I don't want to apply this view to, I don't want apply this view to anything in this URL format: http://www.esselaw.com/node/...

Can this be done?


I believe you can achieve with the following approach:

First Create a view on the same principale as the taxomony term view (admin/structure/views/view/taxonomy_term/edit).

The specific setup shall be :

  • Path settings shall be : /node/%
  • Contextual fitlers : nid with the following setup in the fieldset "When the filter value IS in the URL or a default is provided" : select validor 'content' then choose your content type. This shall restrict the view to the content type selected

When done, setup a custom url pattern for your content type using the pathauto module.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜