I need to change the node object best on translation, in a way that don't think is best for translations in general (imo best as an option like view_mode to auto translate), and easy way to do this is an alter hook before node_view

Comments

hefox’s picture

StatusFileSize
new430 bytes
hefox’s picture

StatusFileSize
new619 bytes

Need ability to not display it when no translation exists, sigh

mrharolda’s picture

Status: Needs review » Postponed (maintainer needs more info)

Is this really needed? There are a lot of hooks that can alter a $node already: https://api.drupal.org/api/drupal/modules%21node%21node.api.php/group/no...

hefox’s picture

The use case in this one was not to display the node in certian occasions (access related), so yea, altering via the other hooks wouldn't be as good

mrharolda’s picture

So you can't fix this with an easy hook_node_access() rule?

hefox’s picture

I don't remember exactly, but that wouldn't have worked -- I think they wanted it to show what it'd look like for the anonymous users so nodes that couldn't be accessed by anon but could for the current user needed not to show.

mrharolda’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

I still think that this could be solved by the generic hook_node_access() and I fail to see why I should add just another node/access alter hook ...

Unless you convince me otherwise; I'm closing this as "won't fix".

emanaton’s picture

StatusFileSize
new625 bytes

Rerolling #2 for the 1.1 branch.