[if-mm !advanced template][set ui_error][L]Need permission for template edit.[/L][/set][bounce page="__UI_BASE__/error"][/if-mm] [if !session admin] [set ui_error][L]Must be logged in as admin.[/L][/set] [bounce page="__UI_BASE__/error"] [/if] [pragma strip_white] [if !cgi good_template] [set ui_error][L]Not a good template -- must enter from template editor.[/L][/set] [bounce page="__UI_BASE__/error"] [/if] [perl] my $template_dir = $Variable->{UI_TEMPLATE_DIR} || 'templates'; my $compdir = $Variable->{UI_COMPONENT_DIR} || "$template_dir/components"; my $t_name = $CGI->{ui_template_name}; my $top = $Tag->filter('textarea_get', $CGI->{ui_template_top}); my $bot = $Tag->filter('textarea_get', $CGI->{ui_template_bot}); $top =~ s~ This is a preview of the $CGI->{ui_template_name} template. EOF push @out, $bot; $Tag->write_relative_file("tmp/tpreview/$Session->{id}", (join "\n", @out)); return; [/perl] [include file="tmp/tpreview/[data session id]"]