By konopko on
Hi! I have question about Views2 (last update):
I've created MyView1 and add MyPage1 (Path=node/%). Set filter to show exact node type MyType1.
And I can see MyPage1 on every nodes of MyType1 and MyType2 and so on anytime. But I need to show MyPage1 only on nodes of MyType1.
How to show Page on only exact node type?
Thanks
Comments
A thought, add an argument
A thought, add an argument on node id, set verification to 'Node' and select the appropriate type from the list that shows.
Right, but…
You are right, but if I create another MyPage2 in other MyView2 with path=node/% and argument validation of MyType2 — I can't see MyPage2 on MyType2 nodes: Drupal say that "Page not found".
I can see MyPage1 when I open MyType1 nodes.
I can't see MyPage2 when I open MyType2 nodes — I can see "Page not found".
What the problem?
Create a block display
I don't think you want to use "node/%" as the path -- that sounds like trouble.
You probably want to create a "block" display for your view and only display that block on pages where the path is "node/%" and the node is of type MyType1. After creating your view's block display, go to admin/build/block and put your block in a region. Then, configure your block and, in the "show block on specific pages" area, select "Show if the following PHP code returns TRUE (PHP-mode, experts only)." and put the following in the Pages box:
Marc
-------
http://www.funnymonkey.com
Click. Connect. Learn.
I want a Pages exactly
I want a Pages exactly for all my Views: MyView1, MyView2 and so on.
Read my previous answer to know about my problem with pages.
May be someth wrong with pages' path (path=node/%)? It the same for all my pages.
Don't use node/% for your path
If you use node/% for your path in a view, you will override any way of viewing node via node/NID.
If you use the same path for two different views, you will be in another mess.
Get rid of all your custom page type views and replace them with block views. Show the blocks only on certain pages.
Views is not required to run Drupal. You may want to uninstall Views, enter a bunch of content, take a look at the paths for each node, and then reinstall Views.
Marc
-------
http://www.funnymonkey.com
Click. Connect. Learn.
Using blocks
Thank for your suggestion.
Now I use different blocks according my node Types. And it is ok.
But in some MyTypeN i have node reference with other node. And when I see that node of MyTypeN I can see the referent node too. But I wouldn't.
When I use a Page I can't see the reference while I set it up.
May be question is how to hide unnecessary content from my node view?
Up
Up
Supply more information
You're going to need to supply more information. It may be good to search through the Views and CCK issue queues as well, because I suspect your questions have been asked and answered before there.
Marc
-------
http://www.funnymonkey.com
Click. Connect. Learn.
Similar problem
I have what seems to be a similar issue. I have a view that I would like to present as a local task on certain node types, so it seems to me that I have to use something like "node/$arg/view-reference" as the url for the view page.
This works, but shows the local task for all node types; I would like to restrict this to only certain node types. Is this possible?
Further searching
Looks like this is indeed solvable - see http://drupal.org/node/144272 for more information.
Use a filter
I have a node type "Dance Event". In the view that creates a list of dance events, I use a filter:
Node: Type = Dance Event
I am going to use the parameter to further filter events on year or month.