-
Notifications
You must be signed in to change notification settings - Fork 0
Utilize dynamic HTML components.
Important Information: Starting from FLSE 1.5.1, flsehtmlcomponents and dynamic HTML are being deprecated for FLSE import and FLSE custom tags as they have better stability compared to flsehtmlcomponents. Issue with flsehtmlcomponent FLSE import and FLSE custom tags
To use dynamic HTML components, we need to answer the question first, what is a dynamic HTML component?
To put it simply, a dynamic HTML component is a piece of HTML that is on multiple pages and will change dynamically whenever you make a change to the main files.
In order for this to work you'll need a:
- HTML file containing component
- HTML file with static content
- FLSE 1.0 ≤
In your HTML file which is going to be your component source, just write some simple HTML that you need to be on multiple pages. For this example, we'll call it header.html
and put it in the same directory as the pages.
Now, in your main file we will add the following wherever we want to put the element. <flsehtmlcomponent src="header.html"></flsehtmlcomponent>
.
Refresh and tada! The most up to date of the html on header.html
will always appear on our main page.
The difference would be that iFrames are rendered seperately from the main page, whereas HTML components are rendered on the same thread as the page. This allows for the new component to interact with other elements on the page and fit as if it were a new element.