CMS Development

mikemidaxo
Mitglied

Adding ID's to Content Modules

lösung

Is there a way to add ID's directly onto image modules or rich text modules? I feel like I used to be able to do this, but currently, it seems like I'm only able to add classes.

 

I can "group" an image module and the ID form field becomes available, but that seems like really unnecessary markup for something simple. Any help? Thanks.

0 Upvotes
1 Akzeptierte Lösung
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

Adding ID's to Content Modules

lösung

@mikemidaxo , do you mean an image field within a module?

you can use {{ name }} as an id to a wrapper within the module. 

Each module does have a unique id. 
if you need a unique id for fields within the you could either add a text field to be inputed or you could append the loop.index to a string so it would look like

<img id="img0">
<img id="img1">
<img id="img2">
<img id="img3">

if it was in a repeater

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
1 Antwort
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

Adding ID's to Content Modules

lösung

@mikemidaxo , do you mean an image field within a module?

you can use {{ name }} as an id to a wrapper within the module. 

Each module does have a unique id. 
if you need a unique id for fields within the you could either add a text field to be inputed or you could append the loop.index to a string so it would look like

<img id="img0">
<img id="img1">
<img id="img2">
<img id="img3">

if it was in a repeater

0 Upvotes