1

We want to select a content type in panels with a specific URL [tgeink.com/latest-news]. Here's why:

We are using panels for several content type 'home pages', like news, articles, etc. They all rely on a view that displays recent posts in the various content types, along with an exposed menu so that users on the 'news' page only get news when they select a topic. Currently we are creating different views for each content type because we can't see how to select content type in panels -- we do it in views.

[It's easy if you are using panels for /%node. We use that to display and edit nodes, with variations for the different content types.]

We'd LIKE to be able use one view for all 'home' pages, and use panels to select the content type. However, we cannot see how to do this when the panel is referencing a URL such as TGEink.com/latest-news. Thanks for any help.

1

You can use views for that solely too you know... Don't use a content pane as described below but a page with path /latest-news/%type.

But for panels: Create a views content pane that gets all types of nodes @ once. Set contextual filter to node->type and choose raw value from url 2.

Create a page in pagemanager with this path: yourdomain.com/latest-news/!type Don't set up a context.

Add the contentpane as content in the page. Now if you visit latest-news/article it shows all article-nodes. If you visit latest-news/page it shows all page-nodes.

Now you can have all benefits from panels together with a view.

  • Thanks. I actually understand this and think it's brilliant. Appreciate it very much. – user3279782 May 13 '14 at 18:15
  • Nice. You can also do this with other info, like terms or users. Then you can use 1 content type for all submissions too. – Marcel May 13 '14 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.