[set page_perm]page[/set] [set page_title][L]Clone component sets to multiple pages[/L][/set] [set ui_class]Content[/set] [set help_name]page.editor[/set] [set icon_name]icon_pages.gif[/set] @_UI_STD_HEAD_@ [if cgi push] [perl] my $source = $CGI->{source}; my @things = split /\0/, $CGI->{target}; my $out = 'cloning '; if(! $CGI->{source}) { return "
No source!
"; } elsif(! $CGI->{target}) { return "
No targets!
"; } my $sfile = $Tag->file($source); $sfile =~ m{(\[control\s+reset=1\].*?\[control\s+reset=1\])}si; my $scomp = $1; my $count = 0; for(@things) { $Tag->backup_file($_) if $CGI->{backup}; my $dat = $Tag->file($_); $dat =~ s{\[control\s+reset=1\].*?\[control\s+reset=1\]}{$scomp}si; $Tag->write_relative_file($_, $dat) and $count++; } return "
$count files updated.
"; [/perl] [/if]
Source Select page to clone. Only pages matching the template type of the source page will be allowed.

Targets
[table-organize columns=3 columnize=1 interplate=1] [calc] my $i = 0; for(@qualify) { my ($fn, $lab, $type) = @$_; push @out, <$lab EOF $i++; } return join "", @out; [/calc] [/table-organize]


Check all      Uncheck all Back files up
@_UI_STD_FOOTER_@