I would like to have a way to add a class to a node where access is restricted through nodeaccess. This way the content can be styled differently and the end user will be able to tell at a glance which posts are not public and perhaps more important to them.

I use nodeaccess a lot when building sites to communicate with clients once the basic design is done. This gets them using their site more and helps make them more comfortable with it. I don't want them to be confused though, thinking my posts are going live to the public site. I'd like to be able to style the restricted posts differently.

Is there currently a way to do that? If so, I've completely overlooked it. If not, I think that would be a great addition to an already great module.

Comments

meisdug’s picture

I've managed a workaround to achieve this functionality and I'm sharing it here in case someone else is looking for the same thing.

I created a new content type and made that content type visible, by default, to only a certain role. My theme is based on the Adaptive Theme which offers the ability to output the content type of each node as a class. That enables me to style the hidden content differently.

I'd still like to see this ability to output an extra "private" class in this module, but this works to achieve the same end result.

Anonymous’s picture

Status: Active » Closed (won't fix)

this module has nothing to do with theming and I wouldn't want it too... In addition it's likely impossible as the node access system grants permission for every single node in the system. Nodeaccess is not consulted when you view a node, only when a node is created or updated, when core asks the module for it's permissions. When you just browse to it, nodeaccess has no involvement and can't do anything.