Find and Replace tool

Hi,

is there any plugin on kirby for Find and Replace string tool on the content? Better if inside the panel? TIA

Mike

Do you mean site wide replacements or in a textarea field? I don’t know of such a plugin.

Hi,

thanks for reply, anyways i just edited the panel and add this feature. I created a new page and form and upon POST

$rootContent = c::get('root.content');
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($rootContent));
 foreach ($files as $file){
   $ext = pathinfo($file, PATHINFO_EXTENSION);
   if($ext == 'txt'){
      // echo $file . "<br>";
      $file_contents = file_get_contents($file);
      $file_contents = str_replace($find, $replace, $file_contents);
      file_put_contents($file,$file_contents);
   }
 }

Thanks,

Mike