I am looking for a way to generate a CSS Id for a Component Presentation, which is guaranteed to be unique within the scope of the page. My initial thought is to make use of the ordinal position of the Component Presentation to generate this ID, which must exist within the scope of the Component Presentation as it will be used within the rendered markup. I am using a combination of VBScript Page Template with a modular Component Template using a Dreamweaver layout TBB.
While I know that I could potentially use
RenderContext in the Page Template to keep track of the ordinal position of the "current" Component Presentation and then pick this up within the Dreamweaver TBB, the legacy Page Template is overly complex, which would make this approach quite messy. Similarly, updating all supported Component Templates to increment a render context variable is not feasible.
Is there any built-in Dreamweaver equivalent to VBScript's
ComponentPresentation.OrdinalPosition? Or is there a preferable alternative method to generate a unique Id for a Component Presentation within a DWT?