Unwanted Navigation Panel Inside the iFrame in the HTML Output

This forum is for all Flare issues not related to any of the other categories.
Post Reply
BartoszK
Jr. Propeller Head
Posts: 2
Joined: Mon Aug 05, 2024 2:21 am

Unwanted Navigation Panel Inside the iFrame in the HTML Output

Post by BartoszK »

Hi there,

Is it possible to remove the skin/navigation elements from the iFrame in the HTML output? I want the content to be plain local HTML.
(screenshot attached for clarity)

Any help is greatly appreciated.

Cheers,
Bartosz
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Unwanted Navigation Panel Inside the iFrame in the HTML Output

Post by NorthEast »

But what is going to be inside the iframe?

I'm assuming you're going to produce two different Flare outputs - one with a skin, and one without a skin to display in the iframe.
For the output that is going to be displayed inside the iframe, set the target Skin to (none).
andrewb
Propeller Head
Posts: 16
Joined: Sun Aug 16, 2015 3:40 pm
Location: Brisbane, Australia

Re: Unwanted Navigation Panel Inside the iFrame in the HTML Output

Post by andrewb »

We were able to hide those elements using a small script and some CSS.
The script just adds a class to the <body> tag of the page in the iFrame:

Code: Select all

$(function () {
	if (window.self != window.top) {
		$(document.body).addClass("in-iframe");
	}
});
Then the CSS hides elements. You'll likely just have to play around with this to remove the elements that you don't want displayed:

Code: Select all

body.in-iframe .tab-bar,
body.in-iframe .MCBreadcrumbsBox_0,
body.in-iframe .sideContent,
body.in-iframe .sidenav-wrapper,
body.in-iframe .topic-header,
body.in-iframe .TopicToolbar
{
	display: none;
}
BartoszK
Jr. Propeller Head
Posts: 2
Joined: Mon Aug 05, 2024 2:21 am

Re: Unwanted Navigation Panel Inside the iFrame in the HTML Output

Post by BartoszK »

@andrewb
Thanks, this is what I need to achieve: one HTML output without the skin/panels when the file.htm appears in the iFrame.
However, I still have a problem with this solution.

I added the CSS to the default styles.css. Also, I added the JavaScript and referenced it in the file.htm that is supposed to be displayed in the iFrame. That doesn't work, and neither does setting <body class="in-iframe"> directly in the HTML code. The output file, after the build, doesn't have this class assigned. It does work only when I add the body class in the output file, after build.
Post Reply