This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
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> "
You need to use the | raw
filter to prevent Twig from escaping the output: {{ record.project_title | raw }}
1-3 of 3