Currently I'm trying to create nice looking URL's for my custom extension.
I am using a plugin on page "Products" (uid: 3) to list all categories.
For example there are the following categories:
- Men
- Shirts
- Sweatshirts
- Women
- Shoes
- Dresses
I'd like to have these corresponding URL's:
www.mydomain.com/products/men.html
www.mydomain.com/products/men/shirts.html
This is, what I get:
www.mydomain.com/products//men.html
www.mydomain.com/products/men/shirts.html
The category "Men" on the first Level does not have a parent category, so this segment remains empty. As soon as there is a parent category, everything is fine.
TYPO3 Version: 7.6.15
realurl Version: 2.1.6
This is my current configuration for fixedPostVars:
'fixedPostVars' => array (
// EXT: productsDb start
'productsDbConfiguration' => array(
array(
'GETvar' => 'tx_productsdb_categories[action]',
'valueMap' => array(
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_productsdb_categories[controller]',
'valueMap' => array(
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_productsdb_categories[parent]',
'lookUpTable' => array(
'table' => 'tx_productsdb_domain_model_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
//'autoUpdate' => 1,
//'expireDays' => 180,
),
// 'valueDefault' => '',
),
array(
'GETvar' => 'tx_productsdb_categories[category]',
'lookUpTable' => array(
'table' => 'tx_productsdb_domain_model_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
//'autoUpdate' => 1,
//'expireDays' => 180,
)
),
),
'3' => 'productsDbConfiguration',
// EXT: productsdb end
),
So, here is my question: Is there a way and what do I need to do, to skip an optional path segment, if it is empty?
Thanks in advance for having a look at it.