Slugfy() Formater does not accept accentuation

If you use your own custom formatter it is better to place it in a different file and give it a unique name. Now you will loose your changes when there is an update in the current formatters.

Create a file like custom.php or myFormatters.php in the formatters folder.

<?php

namespace lib\core;

function formatter_slugify2($val) {
  if ($val == NULL) return NULL;
  $a = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜüÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ"!@#$%&*()_-+={[}]/?;:.,\\\'<>°ºª';
  $b = 'aaaaaaaceeeeiiiidnoooooouuuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr';   
  $val = utf8_decode($val);
  $val = strtr($val, utf8_decode($a), $b);
  $val = strip_tags(trim($val));
  $val = strval($val);
  $val = preg_replace('/[^\w\s]/', '', $val);
  $val = strtolower($val);
  $val = preg_replace('/[_\s]+/', '-', $val);
  $val = preg_replace('/-+/', '-', $val);
  $val = preg_replace('/^-/', '', $val);
  return $val;
}

Use it like {{$_POST.titulo.slugify2()}}.