Search
Site Essentials for Statamic

Site Essentials for Statamic

se_random_id Tag

The se_random_id tag may be used to generate a random element ID. By default generates an ID that is 16 characters long. Generated IDs always begin with the el prefix (which is factored into the final length). The minimum length this tag can generate is four characters.

1{{ the_loop }}
2 {{ _id = {se_random_id} /}}
3 
4 <div id="{{ _id }}">
5 {{# More code that might need to work with the same ID. #}}
6 </div>
7{{ /the_loop }}

Some absolutely amazing
people

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.