This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jcbbuller52235
jcbbuller52235

Hello, I'm using the Code Editor form for input using Rainlab Builder. When I try and get the output of the code it comes out with quotes around it, so it renders at text instead of actual code. Does anyone know how to pull just the code? Is there a resource that talks about the best ways to render all the different types of components offered in this plugin?

I have this entered into the code editor:

<h1> <span class="project-title">Spotify</span> <span class="project-title">Passport</span> </h1>

This is what I have on my frontend to render it(the field is project_title): {% if record %} {{ record.project_title }} {% else %} {{ notFoundMessage }} {% endif %}

And it renders as:

" <h1> <span class="project-title">Spotify</span> <span class="project-title">Passport</span> </h1> "

JeffGoldblum
JeffGoldblum

You need to use the | raw filter to prevent Twig from escaping the output: {{ record.project_title | raw }}

jcbbuller52235
jcbbuller52235

That did it, I appreciate the help!

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.