Notifications
Clear all

Linking pages with a url $_GET() variable

2 Posts
2 Users
0 Reactions
637 Views
Posts: 1
Topic starter
(@havn64)
New Member
Joined: 2 years ago

Hello,

thanks for the great plugin. But I have a question (of course)... I have a website with an advanced iFrame in it. It all works splendid. But my small grievance is: I can  not give people a link to (for instance) a contact page or something like that. I do not want the iFrame pages "naked" without the parent, so I use a little javascript to check if the page is "top", and if so, it just redirects and loads the homepage with the "home" iFrame page. So: https://www.website.com/contact/ finds that its the "top", so it redirects to load https://www.website.com/ instead. Is there a way I can actually use some url to load the iFrame with a different page?  The iFrame has a src set at the start ("home") but how can I override it with a parameter? 

I tried shortcode like:

[iframe src="https://www.website.com/[shortcode  here]" etc]

but that didn't work, I also tried some php (like making the whole thing as a shortcode, and in the php page do: 

$page = $_GET("page");
echo '[iframe src=" ' . $page . ' " etc]';

and call it with https://www.website.com/?page=contact but that also didn't work. Can you give me a tip or point me in the right direction so that I can use a URL to load the iframe with an alternate page? 

Thanks in advance, and have a great day!

Hans

1 Reply
TinyWebGallery
Posts: 925
Admin
(@admin)
Prominent Member
Joined: 16 years ago

To use shortcodes in the url you need the pro version. 

Also if you like to hand over the page of the iframe as parameter.

See

https://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/url-features

Even get parameters can be used directly.

Please enable the pro administration in the free version and then go to the basic tab -> Url.

There you see tons of placeholders you can use. 

On the advanced tab you also find a section with urls. There a lot of back and for mapping can be done. Like the feature that you hand over the url by a parameter you can define.

Does this help already? You can even test this features in the preview with the free version! 

Best regards,

Michael

 

 

 

 

Reply