Posted by visioconseil on February 3, 2013 at 6:18pm
Dear all,
I'm not sure about what i'm searching so i prefer to ask.
Some times when creating a Drupal Site you had to create node type for slideshow or something else.
If content must be published, is there a simple way to prevent access to full node (e.g. using full url such as http://www.myweb.com/node/xxx) ?
I know how to prevent node by node by creating an alias or some rules into htaccess for redirect to home page, but it sounds a little bit to complicated for my client... I was looking for something more simple like a module where i select node type to redirect on home page or something like that.
How do you achieve it ? Do you heard about a module to do that ?
Thanks for all,
Comments
Try Internal nodes module, it
Try Internal nodes module, it should provide what you need.
or set node to unpublish and play around with view unpublished node permission
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com - Premium Theme Club
skype id : duckzland
If I understand correctly,
If I understand correctly, you have a node type that you need to be viewable as a teaser or in a block or a view or whatever, but not as a full node?
If so, I have dealt with this problem several times. Normally what I do is make the node type as usable as possible on it's own, remove any links to it from the teaser etc. and hope that the few people who find it are not too confused.
I think for those people who somehow come across this type of node, a partially working, out of context node is no more confusing than an access denied message or an unexpected redirect.
If you disagree, I still think that using the Drupal access control system won't work. As far as I know, Drupal does not differentiate between view modes when doing an access check. I think you need to do I redirect. The first thing I'd try is the Rules module. Make a rule like this:
{ "rules_redirect" : {"LABEL" : "redirect",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "node_view" ],
"IF" : [
{ "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "article" : "article" } } } },
{ "data_is" : { "data" : [ "view-mode" ], "value" : "full" } }
],
"DO" : [ { "redirect" : { "url" : "[site:url]" } } ]
}
}
When a node is viewed, it checkes the node type and view mode (in this case Article and Full) then redirects to the home page. You could also make a simple custom module to do this.
I take it back. The Internal
I take it back. The Internal Nodes module looks like to is the right way to go. I did not know about it and will definalty try it in the future.
Thanks
I'll take a look for rules solution and Internal Node.
I appreciate your feedbacks !
Regards,
Visio Conseil
http://www.visio-conseil.com