We got this question within Continental: How to add a counter in a Connections page?
I share here the solution/ answer to it.
Free Counter hosting site
There are some sites that provide free counter hosting.
Iframe
The next step is simply to Iframe the URL in Connections or your Web Page.
Simply switch in the editor to the HTML source and paste the HTML code where you want to have the counter inserted.
Example of iframe:
<iframe src="https://free.timeanddate.com/countdown/i7msg3h9/n309/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac000/cpc000/pcfff/tcfff/fs100/szw320/szh135/tatTime%20left%20to%20Event%20in/tacf90/tptTime%20since%20Event%20started%20in/tpc000/mac000/mpc000/iso2021-01-24T00:00:00" allowTransparency="true" frameborder="0" width="302" height="57"></iframe>
Example how it is rendered:
Be careful to use a https URL not a http one as src.
In case you use http, Connections does not render the iframe at all. (no error text)
Failed Attempts
Own HTML for counter
You can create a timer in HTML as explained here:
Hosting HTML in Connections
I have tried to host a HTML file in Connections Files but the iframe around it does not work: when the page loads it tries to download the HTML file.
Example of Iframe tried:
<iframe src="https://connext.conti.de/files/form/anonymous/api/library/ffd279a0-2764-46bb-a8ec-b1aa3c713072/document/8b994a6f-df50-4116-82f1-54b379b5d342/media/timer.html"></iframe>
I've been careful to use the Download link as src.
Alternative Hosting
SharePoint Online / O365
Alternatively, you could host the HTML somewhere else but note hosting files in SharePoint Online currently does not work. (some authorization/ handshake issues) This issue is blocked each side saying it is the other's fault (my understanding)
GitHub Pages
For us a working workaround is to host HTML code in GitHub.
It works nicely now also the iframing in Connections since our GitHub supports now https access.
No comments:
Post a Comment