Pro 6.x Accessing Component ID

I wonder if there is already a hidden parameter for this, or if it could be added in, to be able to access some kind of unique Component ID via dynamic content, such as ‘{{dc:p:id}}’. The specific use case I am come across is things like modal button hashtags and accordion groups, as well as generating SVG content that has within it a clippath ‘#shape’ which needs to be unique for each instance of the Component in use.

If this makes sense, it would be a great handy feature to have.

In the past, within loopers, I have used the post id or other unique identifier for each looper consumer element, so this is a bit of an extension of that possibility but for pulling in multiple Components on the page.

Cheers!

1 Like

That’s a great idea. I checked and I don’t think you can access that right now. It wouldn’t be parameter data and would be more general “element” data. I think it’s a good idea. Something like {{dc:element:id}} that you would place into a parameter if you would want to use it down the tree.

3 Likes

This seems like a great solution and I would love to see it implemented if possible!

I wanted to check if this concept / extra dynamic content is on the cards for one of the upcoming betas / updates?

Currently implementing a sort of work around with an additional element parameter that is a user-entered unique id, which is okay but less ideal than having access to the Cornerstone native unique element id.

Cheers!

1 Like

I took a better look last week on this. I’m not sure it’ll make it into 6.3, but we can take another look when that beta starts. It does feel like an infinite loop waiting to happen so making this safe is my primary concern.

1 Like