This help document details how to set up the Whitelabel iFrame.
TABLE OF CONTENTS
- Change default search tab
- Layout and Styling
- iFrame height auto resizing
- Safari iframe page cookies fix
The venue/supplier search and the enquiry process can be embeded into your site using an iframe by adding a HTML code similar to the one below:
<iframe src="https://xx-iframe.myeventsportal.co.uk" marginheight="5" marginwidth="5" frameborder="0" scrolling="auto" height="250" width="500"> </iframe>
The end results should look like below:
Change default search tab
The search tab can be defaulted to "supplier search" by changing the iframe URL to https://xx-iframe.myeventsportal.co.uk/suppliers
Layout and Styling
The iframe is designed to be responsive, i.e. the layout of the content automatically changes to fit the size of the iframe. The main theme color is the same as the the main whitelabel site, which can be configured in the whitelabel setting area in GRATIS
iFrame height auto resizing
If you don't like the vertical scroll bar in the iframe when page goes too long, there is an option to make the iframe adjusts the height automatically according to the height of the contents. This functionality can be enabled by referencing a Javascript library on your site as shown below:
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="https://raw.githubusercontent.com/davidjbradshaw/iframe-resizer/master/js/iframeResizer.min.js"></script> <script type='text/javascript'> $('iframe[name=xxiframe]').iFrameResize({log: false, enablePublicMethods: true, heightCalculationMethod:'lowestElement'}); </script>
There is no need to add reference to jQuery if it's already used on your site.
Safari iframe page cookies fix
Safari has got a very conservative security policy that prevents crossdomain iframe pages to create cookies within the parent window. To overcome this issue you need to reference a Javascript library that contains the cookies fix.
JS library URL: {your whitelabel iframe domain url}/scripts/safarifix.js e.g. https://xxx.myeventsportal.co.uk/scripts/safarifix.js
Please note, if the cookies fix library is not referenced then the iframe might work incorrectly on Safari browsers.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article