FreeMarker template error when passing parameter from custom content to a custom component
Hi, I have created a custom page, and I'm exchanging some variables from the ADMIN (custom content 2) to the STUDIO (a custom component). It is working, because I see the value at the page. But it also generates an error saying: "The following has evaluated to null or missing: env.context.component.getParameter('t1') [in template "preview" at line 1, column 16]"
At the custom content 2:
1. I give a value to the variable t1
<#assign t1="Main title"/>
2.I put the variable to the custom component
<@component id="custom-component" t1=t1 />
At the custom component:
1. I assign the t1 to the value from the custom content 2
<#assign t1=env.context.component.getParameter('t1') />
2. I print the value to the page
<h1>${t1}</h1>
Does anyone have an idea why it is working but also generates this FreeMarker template error?
- It seems like I'm just stupid.
I've put the custom content and the custom component at the same page. That's why the second time it printed an error. The component has no link with the content.
Sorry to bother you guys.