UniSelector current culture

Martin Opletal asked on January 31, 2020 10:02

I am trying to use UniSelector to select multiple pages. Uniselector works fine, but returns pages in all culture. Do you know how to write where condition to show pages only with current culture?

Correct Answer

Dragoljub Ilic answered on January 31, 2020 10:56

Hi Martin,

You should be able to extend the 'Where condition' in the UniSelector component (in Page Type -> Fields) with the the culture of the currently created document. Something like this should do the job: ClassName = 'custom.Location' and DocumentCulture = '{% EditedObject.DocumentCulture #%}'

It's important to add this as macro and not as simple text in where condition because in that case culture of current document won't be resolved. To achieve that, simply click on the blue arrow on the left side near 'Where condition' label and place the condition inside the popup window.

Best regards, Dragoljub

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.