Я хочу скрыть определенный контент при просмотре в определенной локали.Допустим, у меня есть URL https://website.com/uk
, он должен отображать 5 полей.Но при просмотре в https://website.com/ch
он должен отображать только 4 элемента и скрывать один элемент.Ниже приведен мой код для одного сайта британского сайта
$fields = new FieldList(
TextField::create('FirstName', 'First Name'),
TextField::create('Surname', 'Surname'),
EmailField::create('EmailAddress', 'Email Address'),
TextField::create('Telephone', 'Telephone'),
TextareaField::create('ContactReason','Reason for your message'),
TextareaField::create('ContactMessage','How can we help you?'),
CheckboxField::create(
'MarketingOptin',
'Please e-mail me with the latest news, recommendations, surveys and updates from Kininvie including exclusive offers'),
CheckboxField::create(
'TermsAndCondition',
DBField::create_field(
'HTMLFragment',
"By ticking this box I confirm that I have read the <a href=\"#\">Privacy & Cookies Notice</a> and I agree to the <a href=\"#\">Terms and Conditions.</a>"
)
),
);
Так что при просмотре CH я хочу, чтобы последнее поле флажка было скрыто.Есть идеи?