Block instance Unique ID
Permalink Browser Info Environment
hi,
in your features list, I see: "Block IDⓇ (as of version 2.3.0)"
Can a unique ID be generated for each block instance with this?
Thanks,
Una
in your features list, I see: "Block IDⓇ (as of version 2.3.0)"
Can a unique ID be generated for each block instance with this?
Thanks,
Una
Type: | Pre-Sale |
---|---|
Status: | Resolved |
Hi Ramon,
thanks for your reply. I have read that concrete5 unique IDs change on edit, though I don't understand what the value is of this. I hoped Block Developer Pro offers the possibility to pass its own unique ID to the block-instance, which remains valid, even if the instance on the page is edited at a later date.
Thanks,
Una
thanks for your reply. I have read that concrete5 unique IDs change on edit, though I don't understand what the value is of this. I hoped Block Developer Pro offers the possibility to pass its own unique ID to the block-instance, which remains valid, even if the instance on the page is edited at a later date.
Thanks,
Una
oh, versioning of course, I see what you mean ...
Of course you can still use a “Text” field type and give it a title “ID” or something and use that in your view. Right? Using the build-in bID can be useful for different reasons, so that’s why it’s in there. In case a block never changes after first placement for example.
Hope it’s all clear and do let me know if you have any other questions.
Kind regards,
Ramon
Hope it’s all clear and do let me know if you have any other questions.
Kind regards,
Ramon
I can add one manually I suppose,
Thanks for your help,
Una
Thanks for your help,
Una
Each block instance has an Unique ID already, so Block Designer gives you the option to use that somewhere - wherever you’d want to. So yes, the ID is Unique per block instance. If you’d like to do JavaScripting based on ID’s, I’d recommend using classes instead. This since ID’s can/will change if you edit an instance. This since there is full versioning of pages in concrete5 and you can always revert back to an earlier state of the page.
Kind regards,
Ramon