• Buenas tardes.

    Me gustaría saber si existe la posibilidad de tener dos subcategorías con el mismo slug perteneciendo estas a diferentes padres. Por ejemplo:

    Categoria hombre
    -> subcategoría pantalones (slug pantalones)
    Categoria mujer
    -> subcategoría pantalones (slug pantalones)

    Por defecto entiendo que no es posible ya que los slug deben ser únicos pero me gustaría saber si existe la posibilidad de cambiar este comportamiento.

    Saludos.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Hola,

    I hope you can make sense of an English reply. My Spanish is terrible.

    It’s not possible to override the duplicate slug restriction within the same object type. This is because child categories need to be able to be queried without their parent. SQL would not know which child to return if there were duplicate child slugs.

    You can have duplicate slugs amongst different object types, for example category and tag objects can both have the same slug because the taxonomy is always part of the query, so there is never any ambiguity for SQL.

Viewing 1 replies (of 1 total)
  • The topic ‘Categorías duplicadas’ is closed to new replies.