BTW, the a patch is using: preg_replace ('/<!--.*-->\s/',
'', $this->element(...)); but it seems a little an overkill

On Wed, Feb 8, 2012 at 11:44 AM, Chris Cinelli <
[email protected]> wrote:

> Just to clarify this is what Ia  trying to do:
>
> In the view I have
> <script>
>  var completedText           =   '<?=
> $this->element('DoneShare/completed', array('completed_time' => $
> completed_time)) ?>';
> </script>
>
>
> This work well when the DebugKit is not active  producing this output:
> <script>
>  var completedText           =   'This is my awesome string!';
> </script>
>
> But when the DebugKit is active, it render like:
>
> var completedText           = '<!-- Starting to render - DoneShare/completed 
> -->
>     This is my awesome string
> <!-- Finished - DoneShare/completed -->
> ';
>
> that produce a javascript error.
>
> Since I would like to keep the debug kit on in development, it would be
> nice if I can turn off the rendering of the debugging comments just for
> that specific element.
>
> Any solution for that?
>
> Best,
>    Chris
>
>
> On Tue, Feb 7, 2012 at 2:45 PM, Chris Cinelli <
> [email protected]> wrote:
>
>> I would like to turn off in a specific instruction $this->element(...)
>> the behavior that the DebugKit has to add prepending line with "<!--
>> Rendiring xxx -->" etc.
>> The result of the element rendering goes in a string that should not have
>> those HTML comments.
>> I would like to be able to keep the debug kit on except in that specific
>> instance.
>>
>> Is there a way to achieve that ?
>>
>> Best,
>>     Chris
>>
>> --
>> --Everything should be made as simple as possible, but not simpler
>> (Albert Einstein)
>>
>
>
>
> --
> --Everything should be made as simple as possible, but not simpler (Albert
> Einstein)
>



-- 
--Everything should be made as simple as possible, but not simpler (Albert
Einstein)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to