Content visible on one domain by default?

Garrett Albright - July 1, 2009 - 16:50
Project:Domain Access
Version:6.x-2.0-rc8
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Our client has a "site editor" role who can't see the "Publish to:" checkboxes on the node editing form. Their content automatically gets published to the site they're logged into, but we also want it to be published by default to another domain which is supposed to sort of catch the content of all the other sites by default. (We're using Domain Source so that content is not visible across all domains.)

I'm rather unsure what the right way to go about this is. I wrote a custom module that uses hook_nodeapi() when $op === 'insert' to try to to inject various things into the node, but I couldn't find the key. And I can't write the record to domain_access myself since I can't determine the nid before it's saved.

Any suggestions on the best way to go about this?

#1

agentrickard - July 1, 2009 - 17:39

Use hook_domainrecords() to alter the node grants before it is saved, adding the site you need to in the $grants array, which is passed by reference.

See API.php for documentation.

#2

Garrett Albright - July 1, 2009 - 18:18
Status:active» fixed

Yes! Just what I was looking for. Thanks!

#3

System Message - July 15, 2009 - 18:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.