XF 2.2 How can I reduce this template-style expression

Itworx4me

Well-known member
I have this code:
Code:
in_array($xf.uri, ['/pick-the-winner/', '/pick-the-winner/picks/', '/pick-the-winner/history/', '/pick-the-winner/history/events/', '/pick-the-winner/picks/member/'])

I want to simplify the code to display the widget with any url with /pick-the-winner/ in it. How would I go about this?


Thanks,
Itworx4me
 
Would this code work? I don't know how to write it so it would work in a template....
Code:
strpos($xf.uri, '/pick-the-winner/') !== false
 
Back
Top Bottom