Search…

X3 Photo Gallery Support Forums

Search…
 
stefaniakm
Topic Author
Posts: 6
Joined: 14 Feb 2019, 05:23

Include external html file content in X3 gallery.

04 Mar 2019, 18:13

I would like to include content of this file:

http://www.michalstefaniak.com/coming_soon/index.html

in such way, that when someone clicks on flag on the globe redirecting to not finished gallery yet, he will be asked to go to main folder page.

I tried to include the file with this code in content field:

  <link rel="import" href="/coming_soon/index.html">

but unfortunately without success as resulted here:

http://www.michalstefaniak.com/tuscany1/coming-soon/

I would appreciate any help .
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Include external html file content in X3 gallery.

04 Mar 2019, 22:22

stefaniakm wrote: I would like to include content of this file:
http://www.michalstefaniak.com/coming_soon/index.html
Before anything else, I need to ask what you mean "include content of this file", and what kind of results you are expecting. Did you expect your X3 page to look like the website you "included"? You can't do that in X3 or ANY website ... The ONLY way to include websites INTO another website, is to use IFRAME, in which case the loaded website would display inside a box in your content.

With your method of "include" or other methods like loading the html by AJAX (Javascript), will at best include the HTML CODE. Furthermore, the HTML you are trying to include is already a full page including <head> and <body>, and you can't load/include that into an existing website that already has it's own <head> and <body>.

Sorry, but not sure what you are expecting here. It seems you are expecting something not logical. Why not consider using the built-in X3 INTRO plugin instead, using the same image as in that example?
https://demo.photo.gallery/examples/plu ... tro-image/
 
stefaniakm
Topic Author
Posts: 6
Joined: 14 Feb 2019, 05:23

Re: Include external html file content in X3 gallery.

07 Mar 2019, 19:19

The Idea with Iframe is very good idea , but when clicking the button - the other galleries open in the "frame" and not in original window :(
Do you think it would be possible to  open content in original window after clicking element in frame?
http://www.michalstefaniak.com/tuscany1/coming-soon/
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Include external html file content in X3 gallery.

07 Mar 2019, 19:47

You would need to edit the link in that custom HTML so that it targets parent.location.
Code
<button type="button" class="btn btn-lg btn-default btn-notify" onclick="parent.location.href='/tuscany1/Countries-visited/';">OTHER PLACES</button>