Hi Tim,
thank you for your reply.
Your solution with rendertag does my job actually. Anyway I still can't 
understand the sense of this quote from documentation, which explains the 
potential use of PreExecute: "This is, for example, useful if you have 
pages with database access where scripts should not be processed whenever a 
page is called in SmartEdit or the page preview." How can SmartEdit/preview 
output the result of the script block without processing it?

On Tuesday, 12 March 2013 15:14:16 UTC+1, Tim D wrote:
>
> Stefano,
>
> PreExecute is designed to execute in all modes: SmartEdit, preview, and 
> publish. The main goal is to bake dynamic code for publishing but most 
> users want to see what the results will be in SmartEdit or preview. If you 
> want to only have this code preexecute only for the published site you can 
> wrap the block level in a rendertag that executes only on publish. 
>
> If you want to publish code not interpreted by the Page Builder you should 
> keep it out of PreExecute blocks and it will remain untouched by the Page 
> builder engine. If you want to see the executed code in SmartEdit you can 
> insert <!--RDExecute=asp--> and it will display the result of the asp from 
> the browser not using the PreExecute mechanism.
>
> Best,
> Tim
>
> On Tuesday, March 12, 2013 6:07:51 AM UTC-4, Stefano Celentano wrote:
>>
>> Hi,
>> I'm trying to experiment custom server side scripting using PreExecute 
>> approach. My goal is to process these scripts only when a page is published 
>> and
>> as I understand from documentation, PreExecute only processes code blocks 
>> once before a page is published. So I'd expect that the code inside the 
>> PreExecute tags is *not* processed when viewing a page in SmartEdit or 
>> viewing the template preview. The problem is that this is not my case: when 
>> I switch to SmartEdit or I use the preview, the code is always processed 
>> and output to the response. Notice I'm not putting inside the template 
>> any RDExecute tag. The code I'm trying to use, for now, is just a simple 
>> hello world like this:
>>
>> <!IoRangePreExecute>
>> <%
>> Response.Write("ciao mondo")
>> %>
>> <!/IoRangePreExecute>
>>
>> Thank you in advance!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to