HTML Include

Include HTML component

Base URL #4DBASE tag

Specify the local path to use for the HTML component to include in your template using the base URL syntax. The path is relative to the templates folder you have defined in settings. Any HTML file within the path can be included in a template via the file name. In this case we have defined the menu as separate HTML component. See 4D documentation.

<!--#4DBASE SourceFiles/sandbox/--> the path relative to the template
<!--#4DINCLUDE yd-menu.html--> include the menu html

Include #4DINCLUDE tag

The number of <!--#4DINCLUDE path--> within a page is unlimited. However, the <!--#4DINCLUDE path--> calls can be made only at one level. For example, you cannot insert <!--#4DINCLUDE mydoc3.html--> in the mydoc2.html body page, which is called by <!--#4DINCLUDE mydoc2--> inserted in mydoc1.html. Furthermore, 4D verifies that inclusions are not recursive:

Use the include tag for standard components such as the head section of a page navigation menus, footers and modules or widgets.

<!-- Only call 4d base once per page -->
                <!--#4DINCLUDE yd-head.html-->

                <!--#4DINCLUDE yd-menu.html-->

<footer class="bg-dark text-inverse">
                <!--#4DINCLUDE yd-footer.html-->