Multiple Values in RealUrl

609 views Asked by At

When I got multiple values in my URL of the same name
e.g …&tx_myext_pi1[crit][]=1&tx_myext_pi1[crit][]=2…
and I want to have it multiple times in my RealUrl-ified URL
like …/crit/title-of-crit-1/crit/title-of-crit-2…
it's not working.
I only get …/crit/title-of-crit-1… and …/crit/title-of-crit-2… is missing

…&tx_myext_pi1[crit][]=1…
translates to …/crit/title-of-crit-1/… and
…&tx_myext_pi1[crit][]=2…
translates to …/crit/title-of-crit-2/… so that part is working. But not multiple values.

Is this impossible to do with RealUrl? Should I make a userFunc? How?

My RealUrl Conf

// …
'postVarSets' => array(
    '_DEFAULT' => array(
        'crit' => array(
            array(
               'GETvar' => 'tx_myext_pi1[crit][]',
               'lookUpTable' => array(
               'table' => 'tx_myext_domain_model_crit',
               'id_field' => 'uid',
               'alias_field' => 'title',
               'languageGetVar' => 'L',
               'languageExceptionUids' => '',
               'languageField' => 'sys_language_uid',
               'transOrigPointerField' => 'l10n_parent',            
               'autoUpdate' => 1,            
           ),
       ),
    ),
),
// …
2

There are 2 answers

1
AudioBubble On BEST ANSWER

Is this impossible to do with RealUrl?

Yes, is impossible to achieve this using RealUrl. The problem is that you are using array in the query string.

0
amirhossein693 On

You can merge your values in one string

Like this:

/crit/title-of-crit-1,title-of-crit-1

Or

/crit/title-of-crit-1+title-of-crit-1

And split it when you need. by , Or + or another special character.

For example Drupal uses this rule for multiple values in views moudle.