What are you trying to accomplish
I’m trying to set my title dynamically, using a part of my URL.
Im using the code (javascript) custom field.
What happens is that the javascript code i write in the code field gets parsed as is (as a string)
for example, if i use the variable with the value of “awesome”, and i write in the code block:
Some ${variable} title
the title i get is “Some ${variable} title”
instead of getting - “Some awesome title”
any suggestions?
Code stack you are integrating Builder with
NextJS
On my builder page i created a page field called testField. it’s type is code.
For this example i put in the value - string is ${1 + 2}
I would expect the value that would be geberated to be “string is 3” but i get the value of -string is ${1 + 2}
in my NextJs app i added a console.log with page.data.testField in it.
the printed value to the console is as i metioned above: string is ${1 + 2}