Passing variables to partials


I have a partial called youtube.html and its contents are simple:

<div class="youtube"><iframe width="560" height="315" src="{{ youtubeID }}?rel=0" frameborder="0" allowfullscreen></iframe></div>

When I try passing a parameter to the partial…

{{ theme:partial src="youtube" youtubeID="EieyT6aHztI" }}

The partial renders as:

<div class="youtube"><iframe width="560" height="315" src="'EieyT6aHztI'?rel=0" frameborder="0" allowfullscreen></iframe></div>

See those single quotes in the output around the rendered variable I passed? Am I doing something wrong? How do I get the partial to render without the single quotes?

For many of my posts, I'll have a {{ youtubeID }} variable assigned to the document, so I'll just do a use_context="true" thing and there are no problems. But, when I pass the variable in the method mentioned above, I get the single quotes around the variable.

The documentation ( doesn't mention anything about quotes in passed parameters, so I'm a little confused.

I'm using the latest version of Statamic, btw.

Thanks, Anthony

>>>>>>> Unanswered <<<<<<<
4 Replies