This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Constantin Jacob
Posted Jul 13 - Read on Facebook

Guys,

I've searched for this but it wasn't helpful so please bare with me...

I'm trying to insert a variable I have into layer.html and I've tried almost everything I know of but it just wont work. I've tried #{variable}, {#variable} and #variable and other stuff.

Does anyone know how this works?

11 Comments

Jonas Treub

"#{variable}" should work. If you share your project, or an example, I can take a look

Constantin Jacob

its in line 47

Constantin Jacob

and please don't judge me by that code :p Its a work in progress and I'm working on a module for everyone to use the rings more easily

Jonas Treub

You are writing #{kcalPercentage) instead of #{kcalPercentage} ;)

Constantin Jacob

oh yea. But thats not it. I was dicking around before to get it to work.. just used #{kcalPercentage} and I get a syntax highlight in the code it just prints it out instead of replacing it with the variable

Jonas Treub

Can you send the project to jonas[at]motif.co ? Somehow I can't unzip your shared project.

Constantin Jacob

oh. yeah sure will do

Constantin Jacob

I hope Mail did not butcher the files

Jonas Treub

You can't use single quotes while templating variables. I learned something new as well. So replace the outer single quotes with double ones and you should be good to go.

Constantin Jacob

Head -> Desk 😄 thanks though !

Read the entire post on Facebook