Adding ID's to Content Modules

SOLVE
New Contributor

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.

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Regular Advisor | Platinum Partner

@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

dennis
Reply
0 Upvotes
1 Reply 1
Highlighted
Regular Advisor | Platinum Partner

@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

dennis
Reply
0 Upvotes