I've got a CCK field that is only displayed when a user is authenticated. When a user is not logged in, I need a message that displays something like "Contains subscriber only content, please create an account or login to view". When the user is logged in it would display the content but not the message.

What is the best way to achieve this?

I've looked at the Dynamic Field module and I guess code could be placed in Contemplate but I'm kinda unsure of the code needed to do this. Or is there a module for this?

Comments

markus_petrux’s picture

Status: Active » Fixed

One possible way to do this is coding something in the theme layer. You could override the theme function used for the field, or content.field.tpl.php, or implement a separate field formatter that you can enable from "Display fields" screen, ...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.