Hej!
I want to implement this third party class: http://mobiledetect.net/. What is the best way to do it?
Tried to implement it via SiteTreeExtension, but didn't get it running. Anyone the solution?
Thanks, Mario
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hej!
I want to implement this third party class: http://mobiledetect.net/. What is the best way to do it?
Tried to implement it via SiteTreeExtension, but didn't get it running. Anyone the solution?
Thanks, Mario
I'd probably write a simple MobileDetect module for SilverStripe, using a SilverStripe wrapper class around the thirdparty Mobile_Detect class.
This wrapper would 'include' the thirdparty class, instantiate it and provide some methods to communicate with it to get the results you want.
Then you could work with it just like with any SilverStripe class, from whichever Extention or Controller you'd want
Yep, good idea: https://github.com/knsqnt/SilverStripe_DeviceDetection
Thanks for your help.
Best, Mario