routeEnhancers:
  ProductPageVariant:
    type: Extbase
    extension: CartProducts
    plugin: Products
    routes:
      - routePath: '/{product}'
        _controller: 'Product::show'
        _arguments:
          product: product
      - routePath: '/{product}/{beVariantOption1}-{beVariantOption2}-{beVariantOption3}'
        _controller: 'Product::show'
        _arguments:
          product: product
          beVariantOption1: beVariantOption1
          beVariantOption2: beVariantOption2
          beVariantOption3: beVariantOption3
      - routePath: '/{product}/{beVariantOption1}-{beVariantOption2}'
        _controller: 'Product::show'
        _arguments:
          product: product
          beVariantOption1: beVariantOption1
          beVariantOption2: beVariantOption2
      - routePath: '/{product}/{beVariantOption1}'
        _controller: 'Product::show'
        _arguments:
          product: product
          beVariantOption1: beVariantOption1

    defaultController: 'Product::show'
      # requirements:
      # title: '\d+'
    # title: '\d+'
    # title: '\d+'

    aspects:
      product:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_product
        routeFieldName: path_segment
      beVariantOption1:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
        routeFieldName: uid
      beVariantOption2:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
        routeFieldName: uid
      beVariantOption3:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
        routeFieldName: uid
