This question is more of a theoretical / feature request.

I am wondering if it's possible to show the name of CCK file field in a node but when an anonymous user clicks on it, it would force a login / register.

Right now as permissions go you can choose to show or hide a CCK file field based on a particular role but I think what I am looking for is more of a gray area.

The use case are single nodes (individual support pages for products) that show various cck file fields, some are for public (i.e. anonymous consumption) but others would be for either an authenticated user or a role beyond that)

I would also entertain the idea of sponsoring a developer to create this functionality.

Comments

danny englander’s picture

Title: View CCK file field but not download, i.e. force login or register » View CCK FileField but not download, i.e. force login or register
quicksketch’s picture

You can do this through using Content Access module and some basic theming, since the entire node object is always available even if the field itself is not shown.

danny englander’s picture

quicksketch, thanks, I am already using content access and see where I can set permissions on a node so perhaps I am missing something? thank you.

quicksketch’s picture

Category: feature » support
Status: Active » Closed (fixed)

There aren't any options to show just the label but not the contents of the field, you would need to manually theme the output in your node.tpl.php file. As I don't help with custom coding and this isn't really a FileField question anyway (and because of this issues age), I'm closing this issue directly.