Prevent __FUEL_MARKER__X from being output?

edited January 2012 in Bug Reports
Hi,

I am currently developing a solution that will allow a user to manage a set of data for input into a javascript function, however if I add this as a fuel variable, I get a __FUEL_MARKER__X comment in the middle of my data string.


Code:
var slider={};
slider.data=[
<?php echo fuel_var('slider_data', ''); ?>
];


Obviously, I need to turn off the fuel markers, if at all possible. Thoughts?

Comments

  • edited 4:45PM
    The signature for fuel_var is:

    fuel_var($key, $default = '', $edit_module = 'pages', $evaluate = TRUE)

    If you empty out $edit_module there with an empty string or NULL it should empty the markers:

    var slider={}; slider.data=[ <?php echo fuel_var('slider_data', '', NULL); ?> ];
  • edited 4:45PM
    You can set a constant of "USE_FUEL_MARKERS" to FALSE which will turn them off. Also, you can just use $slider_data instead of using the fuel_var function. The fuel_var function will output the comments used for inline editing.
Sign In or Register to comment.