1
votes

Not sure if rules will be the solution to this but its where I've dived in, could be entity reference but here goes.

I have a site showing horses. Dobbin, Neddy etc with some information about them including videos. Users may have a number of nodes for each horse, eg, 20 x Dobbin nodes doing jumps on a different day

Users can optionally offer the horse for sale so there is a For Sale: yes / no field. If yes a for sale sign goes on the video. Simple enough.

The task is:

If user goes into a Dobbin node and selects yes to put the flag on for sale how can I automatically update it so that all Dobbin nodes have the same flag? Otherwise it involves going in to change all the nodes for Dobbin to yes. I need this to apply to existing & new nodes for Dobbin...ie if any Dobbin node has field value yes for sale then any Dobbin node will automatically have this for sale field value.

A secondary requirement is to limit this to the user, ie, I dont want any node Dobbin to update (more than 1 user could have a horse called Dobbin). I'm sure I'll be able to resolve this if I get put on the right track for issue 1.

Thanks for any help.

Jeremy

1

1 Answers

0
votes

You are talking about related entities (excuse the names):

a. horse b. horse activity

Information and access controls related to a horse is implemented with that content type, likewise, nodes about 'horsing around' remain with the second content type.

You create an entity reference in your horse activity content type to link the two.

When a horse is for sale, you simply change the for-sale attribute on your horse content type.

Views provide a way to present the linked relationships as a single node to a user.

Replicating field content across multiple nodes solves one problem you have - poorly.

Implementing a relationship like that above solves this along with many other issues you will have such as horse ownership, access controls, new attributes.