I have a generated path with different categories and products made with an own extension. There can be one, two or three categories, plus a product below the second or third category.
Examples of URLs that should work:
/mainCategory/
/mainCategory/secondCategory/
/mainCategory/secondCategory/product-title
/mainCategory/secondCategory/thirdCategory/
/mainCategory/secondCategory/thirdCategory/product-title
The problem now is the not required thirdCategory to show the product.
My configuration:
'fixedPostVars' =>
[
'produkt' =>
[
0 =>
[
'GETvar' => 'tx_vendor_plugin[mainCategory]',
'lookUpTable' =>
[
'table' => 'sys_category',
'id_field' => 'uid',
'alias_field' => 'title',
'languageGetVar' => 'L',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'useUniqueCache' => 1,
'useUniqueCache_conf' =>
[
'strtolower' => 1,
'spaceCharacter' => '-',
],
],
],
1 =>
[
'GETvar' => 'tx_vendor_plugin[subCategory]',
'lookUpTable' =>
[
'table' => 'sys_category',
'id_field' => 'uid',
'alias_field' => 'title',
'languageGetVar' => 'L',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'useUniqueCache' => 1,
'useUniqueCache_conf' =>
[
'strtolower' => 1,
'spaceCharacter' => '-',
],
],
],
2 =>
[
'GETvar' => 'tx_vendor_plugin[thirdCategory]',
'lookUpTable' =>
[
'table' => 'sys_category',
'id_field' => 'uid',
'alias_field' => 'title',
'languageGetVar' => 'L',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'useUniqueCache' => 1,
'useUniqueCache_conf' =>
[
'strtolower' => 1,
'spaceCharacter' => '-',
],
],
],
3 =>
[
'GETvar' => 'tx_vndor_plugin[product]',
'lookUpTable' =>
[
'table' => 'tx_vendor_domain_model_product',
'id_field' => 'uid',
'alias_field' => 'title',
'languageGetVar' => 'L',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'useUniqueCache' => 1,
'useUniqueCache_conf' =>
[
'strtolower' => 1,
'spaceCharacter' => '-',
],
],
],
],
When I add noMatch => bypass
to the thirdCategory, it doesn't show up any third category. Every third category cannot be accessed.
When I use it without noMatch => bypass
, there is an empty path parameter in the URL for products without third category: /mainCategory/secondCategory//product-title
Who can help me with that?