Best way to build references between blocks
Permalink
I want to reference blocks from type A in type B. Saving the bID doesn't work because it changes every time a block is edited (the new version saved get's a new ID).
My solution would be to add a custom ID field in type A, that stays the same over all versions of the block. To get the newest version of the referenced block i'd fetch all blocks of the page i use to maintain them and loop through them to get the one with the right custom ID. Does this sound to be a good approach or is there a better one?
My solution would be to add a custom ID field in type A, that stays the same over all versions of the block. To get the newest version of the referenced block i'd fetch all blocks of the page i use to maintain them and loop through them to get the one with the right custom ID. Does this sound to be a good approach or is there a better one?