When using TypoScript to generate HTML i.e. in an FCE, you sometimes need a unique ID for that content element - everytime the FCE is used on the page.
For example, when creating an image gallery, Shadowbox requires a different ID in the rel attribute for every single gallery. Hard-coding the ID would prevent the FCE to be used multiple times on the page:
Your own FCE could get now an "ID" parameter the editor has to fill out if he wants to use the FCE multiple times. The better variant is to automatically use a different ID each time the FCE is rendered.
Now the uid of the tt_content table sounds like the ideal unique string to use here, but accessing it in TypoScript is a bit tricky.
TSFE:currentRecord unfortunately contains the current page ID
only, but TemplaVoila comes to rescue here:
Using that in TypoScript, i.e. to wrap an image, is easy: