Embedding content on your website (iframe)

With an iframe you are able to display content from Smoothcomp inside your own website. 

This feature requires the federation platform.

Embed upcoming events on your own website

  • This will display your upcoming events. You can see a demo here where Grappling Industries are displaying their next six upcoming events on their landing page at http://grapplingindustries.com.
  • Navigate to your events page in Smoothcomp that you would like to embed. Now copy that URL. Use the script below and replace {link} with the URL you just copied.
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.1/iframeResizer.js" type="text/javascript"></script>
<style>iframe#scevents{width: 1px;min-width: 100%; border:0;}</style>
<iframe id="scevents" src="{url}/embed/6" scrolling="no" onload="iFrameResize()"></iframe>
  • AMOUNT OF EVENTS Replace /embed/6 in the code above with how many events you want the iframe to display. In this example it would display the 6 next upcoming events.

Embed other pages, like rankings

  • It's also possible to embed other pages like your ranking, information pages or brackets etc. You can see a demo here where Grappling Industries are displaying their rankings here: http://grapplingindustries.com/rankings/
  • Navigate to the page in Smoothcomp that you would like to embed. Now copy that URL. Use the script below and replace {link} with the URL you just copied.
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.1/iframeResizer.js" type="text/javascript"></script>
<style>iframe#scevents{width: 1px;min-width: 100%; border:0;}</style>
<iframe id="scevents" src="{url}?embedView=1" scrolling="no" onload="iFrameResize()"></iframe>

Embedding parameters

  • It's possible to pass options to the URL for extra flexibility. 
  • This is based on the standard GET Parameter (the first parameter is specified with "?" and then the following parameters starts with "&").
  • In the example above we are already passing the parameter embedView=1 which means we will activate the special embed view which will also automatically hide the main menu. If you still want to display the main menu, and also have the links opened in new windows (blank) you can use the full parameters as "?embedView=1&includemenu=1&linktargets=blank"
embedView=1
// Activates the embed view. This will also hide the main menus automatically (and only display the content)
includemenu=1
// This will force the main menu to be displayed in the embed view
	
linktargets=blank
// blank = Will open links in new window
// parent = Will open links in the parent window (default)
// inherit = Inherit the original setting from Smoothcomp<br>
	
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us