Customize landing page in iframe

I am running CMS indexhibit, indexhibit uses an iframe to load content.

http://www.therussianfrostfarmers.com/

My home page has WordPress loaded in this iframe which works fine, I have some scrolling issues but this is another problem.

Currently, when ppl finds a WP post via a search engine, the user is redirected to the home page, I need to do this, otherwise the user will only be able to view the WP content and not the rest of the site. eg; http://www.therussianfrostfarmers.com/oldspeak/?p=480

What I need to do is split the request and send the "id" to the iframe, which inturn will load the corresponding WP page inside the iframe.

I'm not sure where to start. Can I use PHP to split the request? and Javascript to set some iframe properties?

.... any help would be much appreciated

thanks to Cam

0


a source to share


1 answer


You may not need to split the query string. You can just use PHP to get the value of this GET variable, for example:

$_GET["p"]

      

will equal 480 for the request http://www.therussianfrostfarmers.com/oldspeak/?p=480



then you can just use the properties of the iFrame to change what it asks for. I believe the url the iFrame is looking for is set in the HTML attribute. This way you can just set the iframe url to

http://www.yourwordpresssite.com/?p=<?php echo $_GET["p"]; ?>

      

Or a similar method.

0


a source







All Articles