0

I have a content type for concerts, and a view for upcoming concerts.

For some of the upcoming concerts, the performer (site owner) wants to list just the date and the venue, but cannot list the title of the performance, because the company has not yet announced the season.

Is there a way to keep part of a node of that content type private, preferable until a specific date has been reached?

I am looking for a secure and foolproof solution, because I don't want to be subject to a lawsuit, in case the information leaks prematurely.

The alternative could always be to create two nodes - one of them published with only the public information, with an expiration date, the second one with the full information, initially unpublished, with an automatic publish date. However, I would like to provide a more comfortable way to input the information - add it only one time and don't worry about it.

So, for the alternative solution - what is the best way to create a node from a node with extracting part of the info of the parent node to the child node? For this scenario, I imagine changing the content type permissions to allow only authenticated users, and creating or updating child nodes in a "public" content type with the allowed subset using something like rules.

Any hints would be greatly appreciated.

2 Answers 2

1

You can do this using Views. Set up a contextual filter for the node id. And then a filter that sets a condition on your date field. This means the View will only have results when (a) your node is displayed and (b) the date condition is matched. Set the filter up as a block. And set that block to show only for that node type.

This is an approach I've used a lot. For example, you can use the same approach to show some fields to logged on users but not to non-logged on users. In effect, you're using the View to show fields depending on some condiiton.

4
  • Looks promising. One think I am concerned about is, that then the actual node would be published and accessible. Even if the complete node is not linked, it would be possible to guess the node id, and access the node. Any thoughts about that?
    – Ursula
    Commented Aug 9, 2013 at 20:04
  • On Manage Display for the node, hide the fields you want to show conditionally. That way those fields only ever get displayed by the View block. So fields that are always displayed get shown by the standard node display process and the other ones get shown in the Views block but only when filter conditions met. Make sense?
    – Obliquely
    Commented Aug 9, 2013 at 21:31
  • Thanks for the help - this functionality is right now on the back burner, I'll revisit the issue when I have more time. Your solution doesn't seem perfect, because the field I want to hide is the title ... and I don't want to hide it, I want to replace it with something generic - sounds like post-rendering might be easiest. But I'll explore your approach anyway.
    – Ursula
    Commented Sep 7, 2013 at 2:45
  • 1
    You may already know this, but if you use Display Suite you can disable the display of the node title or change what is displayed in the the title slot using tokens. That might be helpful for you use case.
    – Obliquely
    Commented Sep 7, 2013 at 10:32
0

have you treid Field Permissions Module.

this module will help to give view/edit access for each field while creating cck fields.

Best,

Anas

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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