Stop breaking frames

Stop breaking frames

by Walter Balser -
Number of replies: 3
Hi there:
First of all...FANTASTIC program!

I was wondering if you could tell me how I could prevent the 'home' link (the main index.php) from breaking frames. We do use a frames setting that is integrated, but whenever we try to go back to the main site through the navigation it breaks the frame and messes everything up. Thanks.
Average of ratings: -
In reply to Walter Balser

Re: Stop breaking frames

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks.

If you look at the HTML source code you'll see that link has TARGET=_top - which is making it break out
of any frames it might be in. The idea is to prevent users ever getting caught in frames-within-frames-within-frames. Many other links in Moodle use this too, such as the navigation and teacher editing links etc.

It might be better to use TARGET=_parent, but unfortunately these links are sometimes within
Moodle frames, and sometimes not - so they would still sometimes break your external framing.

It's a tricky problem which I think will require some Moodle functions to always check whether they are currently in a frame or not. Perhaps something for a future release - file it as a bug on bugs.moodle.com.

Cheers,
Martin
In reply to Martin Dougiamas

Re: Stop breaking frames

by Walter Balser -
Hi Martin:
Although I can view the source code and view the tags that I should modify, I am unsure which files I edit on the backend? That is, the themes folder and everywhere else I can see doesn't seem to have the actual html layout to edit. Thanks,
Walter
In reply to Walter Balser

Re: Stop breaking frames

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It would be easier to try a different tack.

Instead of putting a frame around Moodle, why not just create a new theme that contains all your own navigation graphics, colours and so on in the header and footer?