When the reference node is unpublished, currently it is displayed as

node title (unpublished)

How can I remove the "(unpublished)" part?

Comments

benanne’s picture

I'd also like to know how to remove this. I checked the field configurations and the views that use those fields to see if there are any options regarding this addition, but I haven't found any.

giorgio79’s picture

Project: Content Construction Kit (CCK) » References
Version: 6.x-2.8 » 7.x-1.x-dev
Component: nodereference.module » User interface
fgm’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

This does not seem to be the case currently. The referenced node is now just wrapped in a <span class="node-unpublished"> element, without additional words.

Can you still see it in any way ?

giorgio79’s picture

Thanks will check, have not yet immersed myself in D7 but I was told I have to put such requests for D7. Perhaps benanne can confirm :)

danielb’s picture

I don't see anywhere in the Drupal 7 code that outputs (unpublished), whereas in the Drupal 6, it is there in the formatters:

theme_nodereference_formatter_default()
theme_nodereference_formatter_plain()

If you're still on Drupal 6, you can easily override this stuff, since it is themeable
Check out the theme guides if you don't know how http://drupal.org/node/457740

fgm’s picture

Project: References » Content Construction Kit (CCK)
Version: 7.x-2.x-dev » 6.x-2.8
Component: User interface » nodereference.module
Status: Postponed (maintainer needs more info) » Active

Returning to CCK 6.2.8, according to #2 and #5

rlnorthcutt’s picture

Status: Active » Closed (fixed)

The "(Unpublished)" string is properly wrapped with the t() function - so you can "translate" it to nothing. Use the strong override in the settings.php for your site and make it blank:

 $conf['locale_custom_strings_en'] = array(
   '(Unpublished)'      => '',
 );

Since this is so old, I'm marking it closed as well.