function updateSlug($category,$slug,$title){
        if($slug!='')
            $slug= $this->str_slug($slug);
        else
            $slug= $this->str_slug($title);

        if($category->slug==$slug)
            return $slug;
        else
            return $this->checkSlugInCategories($slug);
    }