I often come across times that I want to hide nodes that are only shown in views. For example a listing of services that do not need their own page and are only shown on the services listing page. What is the best practice for hiding those nodes.
Currently I give them a very specific path with pathauto and change robots.txt file and hope people do not stumble on them but I would like something better. I have also written PHP that just put a link to the aggregated view.
Are there other things that people like to do?
Thanks, Steve
Use CCK to create the type and then permissions to control their access. Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________
From: Steve Kessler
Currently I give them a very specific path with pathauto and change robots.txt file and hope people do not stumble on them but I would like something better. I have also written PHP that just put a link to the aggregated view. I often come across times that I want to hide nodes that are only shown in views. For example a listing of services that do not need their own page and are only shown on the services listing page. What is the best practice for hiding those nodes.
Nancy,
I am looking for the node to just not be findable at all. So if a non-registered user went to node/100 and that was one of the nodes that was part of the list they would get page not found or redirected somewhere.
I think the more I think about this doing it in the node.tpl is the best way.
Thanks, Steve
On Tue, May 24, 2011 at 5:32 PM, Ms. Nancy Wichmann nan_wich@bellsouth.netwrote:
Use CCK to create the type and then permissions to control their access.
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Steve Kessler
I often come across times that I want to hide nodes that are only shown in views. For example a listing of services that do not need their own page and are only shown on the services listing page. What is the best practice for hiding those nodes.
Currently I give them a very specific path with pathauto and change robots.txt file and hope people do not stumble on them but I would like something better. I have also written PHP that just put a link to the aggregated view.
-- [ Drupal support list | http://lists.drupal.org/ ]
I consider a theme solution as a very last resort. I would do this in hook_nodeapi() (D6) or hook_view() (D7). Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________
From: Steve Kessler
I think the more I think about this doing it in the node.tpl is the best way.I am looking for the node to just not be findable at all. So if a non-registered user went to node/100 and that was one of the nodes that was part of the list they would get page not found or redirected somewhere.
On 24/05/11 17:01 -0600, Steve Kessler wrote:
I often come across times that I want to hide nodes that are only shown in views. For example a listing of services that do not need their own page and are only shown on the services listing page. What is the best practice for hiding those nodes.
Currently I give them a very specific path with pathauto and change robots.txt file and hope people do not stumble on them but I would like something better. I have also written PHP that just put a link to the aggregated view.
You could just not publish them. Views can show unpublished nodes. You can add a CCK field "show in view" if you have nodes of the same content-type that you don't want to be shown in the view.
Are there other things that people like to do?
Lots of things.
- Rolf