Disable bID changing for a block
Permalink
Hi there. I am implementing a block which uses multi-tables.
It is a quiz, so questions an answers are part of a separated table.
The problem is I keep loosing the associations because bID of the main quiz table changes every time I update it.
How can I keep it fixed?
Thank you very much.
It is a quiz, so questions an answers are part of a separated table.
The problem is I keep loosing the associations because bID of the main quiz table changes every time I update it.
How can I keep it fixed?
Thank you very much.
Either:
Keep track of the changing bID and update your secondary tables as it changed
or
Generate a unique ID when the block is first added, then use it to cross reference the secondary tables.
There are plenty of examples of both approaches in the core and in free blocks. Slideshow/galley blocks often need to solve this type of requirement.