Custom layout is throwing an error on encoded json
Hey,
I'm using encoded json on data-attributes of certain elements and only on my custom layouts is this error being thrown:
An Error Was Encountered
Compilation error at line 236 in "string:" : Parse error in ""name":"Event 1","url":" [..]
The HTML that is throwing the error looks like this:
<p><a data-popover="{"name":"Event 1","url":"evenementen\/event-1","image":"assets\/image.jpg [..] ">Event 1</a></p>
(my edit of [..] for brevity on the above two quotes)
In other pages, one's that I've made through PHP in fuel/application/views, are not throwing this error, it's only custom pages made through Dashboard > Pages. The code used to display this element is exact the same on all pages, and it's:
<?php $this->load->view('_blocks/sidebar', $this->sidebar_model->get_sidebar()); ?>
That's in my views/_layouts/x.php and the views/x.php page.
Any idea? The error seems so strange that I thought perhaps it's the template engine throwing an error?
Thanks,
Comments
Also, you can wrap things in {literal}.....{/literal} to escape template parsing.