mwilbers Posted January 7, 2007 Report Share Posted January 7, 2007 Hi all,I use Joomla to present my TNG pages. This works just fine fot me. My only problem is "deep linking". Google indexes my TNG pages, and when you find one of my TNG pages, Joomla doesn't get loaded, just the TNG page.Now I'm looking for code, preferably JavaScript, to detect this. And after detection, load Joomla with the TNG page or just Joomla with my TNG start-page.I got a pretty good idea how this should be working, only, I'm not any good with JavaScript (or PHP, for that matter )I think it should test the parent-document presence or name, and if not correct, load the Joomla page.Something like this.if this.parent.location = present or name="something" then "OK"else load("http://www.blablabla")Does anyone have this kinda code on hand, or is able to write me some kind of example?After I get it to work, I'll share it here on the forum, ofcourse!Much appreciatedMaarten Quote Link to comment Share on other sites More sharing options...
mwilbers Posted January 13, 2007 Author Report Share Posted January 13, 2007 Hi,I found the solution! And it's even more simple than I thought.<script language="javascript"> if (self==parent) {location.href="http://www.maartenwilbers.nl/index.php?option=com_wrapper&Itemid=61"};</script>I load my TNG in a "wrapper", as Joomla calls it, which is actualy an iFrame.So if the TNG frame (=self) had no parent frame, the test is "true", and it reloads the page in the Joomla environment.As simple as that! Maarten Quote Link to comment Share on other sites More sharing options...
BMR789 Posted January 24, 2007 Report Share Posted January 24, 2007 Hi Maarten.That's interesting - Something I have been thinking about as well.Where do you place that piece of script?Also how do you handle the Iframe's double scroll bar?ThanksBlair Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.