# Inject Variables into Custom Files

**URL:** <https://forums.realmacsoftware.com/t/inject-variables-into-custom-files/45665>\
**Category:** RapidWeaver Elements\
**Created:** [December 17, 2024, 11:17pm UTC](https://forums.realmacsoftware.com/t/inject-variables-into-custom-files/45665 "2024-12-17T23:17:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [December 17, 2024, 11:17pm UTC](https://forums.realmacsoftware.com/t/inject-variables-into-custom-files/45665/1 "2024-12-17T23:17:09Z")

</div>

Hi @dan  
We are going to need a way to directly inject variables into all kinds of scripts and even css that is placed in locations like Body End, etc.  
Right now it’s a nightmare of having to create data attributes and then read those back in and get those values and then inject them - which defeats the whole purpose of an API - this is the same insanity that Blocs forces devs to do - I expect it to be very easy on Elements.

---

<div class="post-metadata">

**Author:** ![tpbradley](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/tpbradley/32/25503_2.png) [@tpbradley](https://forums.realmacsoftware.com/u/tpbradley)\
**Post date:** [December 18, 2024, 12:50pm UTC](https://forums.realmacsoftware.com/t/inject-variables-into-custom-files/45665/2 "2024-12-18T12:50:24Z")

</div>

Hi @Bill,

I’m not sure I follow, have you got a sample project showing what you’re trying to do?

Cheers
