function getUniqueFrontendName( $frontend ) {
$f = $this->find('list', array(
'conditions'=>array( 'frontend LIKE'=>"$frontend%" ),
'fields'=>array( 'frontend' )
));
if ($f) {
$lastNum = 0;
$frontend = $frontend.$lastNum;
while ( in_array($frontend, $f) ){
$lastNum++;
$frontend = substr($frontend, 0, - strlen($lastNum) ).$lastNum;
}
}
return $frontend;
}