XF 2.0 Need help making xenforo if syntax

Rick7C2

Member
Licensed customer
I need to create a xenforo if syntax to conditionally load jQuery.js

The condition needs to be...

If current url does NOT contain xenforo_url (as set in admincp) load jQuery.js


For instance if the xenforo site url is https://www.example.com/community

If you are accessing the following url, then load jQuery.js

https://www.example.com/community/*


But if you are accessing this url don't load jQuery.js
https://www.example.com/


How would I go about doing this?
 
Ok so I found the following vars...

{$xf.fullUri} = Current access url... https://www.example.com/
{{ link('forums') }} = dir the forums point to... /community/

How would I make an if statement like so...

if {$xf.fullUri} does NOT contain "https://www.example.com{{ link('forums') }}"

Then load jQuery.js


Also where does xenforo load jQuery.js located in "js/vendor/jquery" I haven't had any luck finding it.
 
Back
Top Bottom