Download the app now and test it for free for 10 days
Currency Select Language Select region

Objective of the Tutorial

In this tutorial, you will import an existing Bootstrap 5 layout into the bluetronix CMS. You will break down the original HTML page into Header, Footer, individual section templates, and the actual layout frame. Afterwards, you can freely insert, move, and reuse the individual page sections in the editor.

Note: This tutorial covers the basic layout import. Further editing or replacement of images will be discussed in a subsequent tutorial.

1. Open original template under bx_Import

Open the folder bx_Import in the file manager. The imported layout is initially in its original state there – for example, with the original image folders and HTML files. In this area, you only work with the existing original files; changes are not saved back to the original template.

For this example, open the file index.html and switch to Edit. This file will now be broken down into the individual components of the CMS layout.

Screenshot Placeholder: File manager with the open folder bx_Import, image folders, and original HTML files – dev_bootstrap_import_bx_import_originaldateien.jpeg. Take the image and later embed it here.

Screenshot Placeholder: index.html from bx_Import in the HTML editor – dev_bootstrap_import_index_html_bearbeiten.jpeg. Take the image and later embed it here.

2. Separate header from index.html

Search for header in the HTML code using Ctrl + F. In many Bootstrap templates, the header can quickly be found because it is marked with a corresponding HTML element. In some templates, the header consists only of a div area; in this case, you need to examine the structure more closely.

Highlight the entire header area and copy it. It's best to work with two open windows so that you can switch between the original template and your CMS project.

Screenshot Placeholder: Header area of index.html found through search and marked for copying – dev_bootstrap_import_header_markieren.jpeg. Take the image and later embed it here.

3. Incorporate header into the CMS

Return to your project, open the main directory, and then Header → HTML Code. Paste the previously copied header code there.

Next, check the local paths. In many layouts, relative references and image paths must be prefixed with a leading slash to function correctly within the CMS structure.

href="css/style.css"   →   href="/css/style.css"
src="images/logo.jpg"  →   src="/images/logo.jpg"

Important: Use Ctrl + H for find and replace, but do not blindly replace paths. In particular, check external URLs, anchors, mailto: links, and already absolute paths.

Screenshot Placeholder: Main directory → Header → HTML Code with inserted header – dev_bootstrap_import_header_html_einfuegen.jpeg. Take the image and later embed it here.

Next, search for the footer in the original index.html. Cut or copy the entire footer area and paste it into the designated footer file in the main directory of your project. Also check all local href and src paths there.

Screenshot Placeholder: Footer file in the main directory with inserted footer code – dev_bootstrap_import_footer_html_einfuegen.jpeg. Take the image and later embed it here.

5. Split main area into individual section templates

The remaining page content after the header and footer is not directly copied into the index.html of your project. Instead, open bx_Layout → SectionTemplate.txt → HTML Code.

Insert the remaining main area of the original template at the end of this file. Then divide it into individual areas that will later be available separately in the editor.

Between two section templates, place the following exact separator:

<!--__SP_SectionTemplate__-->

Each section separated this way can later be inserted as its own template in the editor. This allows you to freely arrange sections, reuse them multiple times, or omit them on a page.

Screenshot Placeholder: bx_Layout → SectionTemplate.txt with multiple sections and the separator <!--__SP_SectionTemplate__--> – dev_bootstrap_import_sectiontemplate_trenner.jpeg. Take the image and later embed it here.

6. Incorporate layout frame into 00_layout

After separating the header, footer, and main sections, the actual HTML framework remains, for example, containing DOCTYPE, the head area, and other overarching layout elements. Copy this remaining code.

Next, open the database management and edit the 00_layout database. Layout templates are already available there. You can edit an existing template or create a new layout.

Insert the copied framework under LayoutHTML. At the original positions of the header, main content, and footer, use the CMS tags:

__DB_Layout_Header__

__DB_Layout_Main__

__DB_Layout_Footer__

When rendering the page, these tags will be replaced by the corresponding header, the current main page, and the footer. The associated PHP code under LayoutPHP is automatically executed when the layout is loaded.

Screenshot Placeholder: Database 00_layout with LayoutHTML and the tags for header, main, and footer – dev_bootstrap_import_00_layout_layouthtml.jpeg. Take the image and later embed it here.

7. Check CSS, JavaScript, and favicon paths

Within the layout code, check all references to CSS, JavaScript, and favicon files. Set the required leading slash for local paths. For CSS and JavaScript files, additionally use the file version tag from the CMS.

A JavaScript call can look something like this:

<script src="__FV_/bx_script/core.min.js__"></script>

The marking __FV_...__ allows the system to consider the file version or modification date when rendering. This way, the browser can load the current CSS or JavaScript file after changes, without the user having to manually refresh their browser cache.

8. Clean up head content and use header HTML

Check the adopted head section and remove contents that have already been set by the CMS or loaded elsewhere. You can also remove a fixed page title if it is generated automatically by the system.

Header code needed by the editor that should not be part of LayoutHTML should be stored under Extras → Header-HTML. This allows the editor to consider the stored content when editing the page.

Screenshot Placeholder: Extras → Header-HTML with the moved header code – dev_bootstrap_import_extras_header_html.jpeg. Take the image and then embed it here.

9. Select imported layout for the page

If you have created a new layout in 00_layout, open the Page Settings in the editor and select your imported layout there. Only then will the respective page be displayed with this layout frame.

Screenshot Placeholder: Page settings with selection of the newly imported layout – dev_bootstrap_import_seiteneinstellungen_layout.jpeg. Take the image and then embed it here.

10. Assemble homepage from the imported sections

Click Edit on your page. The homepage may initially appear empty. This is normal, as none of the new page sections have been added to the actual page yet.

Select Insert → Page Section. The areas that you previously separated in SectionTemplate.txt with the section delimiter should appear there.

Insert the necessary sections one by one to recreate the original page. You can then move, omit, or duplicate the sections at will.

Screenshot Placeholder: Editor → Insert → Page Section with the imported section templates – dev_bootstrap_import_sections_einfuegen.jpeg. Take the image and then embed it here.

11. Use original page as reference

Under Files → bx_Import, you can still preview the original index.html. Use it as a reference while assembling your new CMS page from the individual sections.

If individual templates initially lack images, their correct integration will be covered in a subsequent tutorial.

12. Check paths and editability of all sections

Finally, check Sections → Section Template once more and verify all local paths. For many similar paths, you can efficiently make changes in a text editor using Ctrl + H.

Test each imported section in the editor afterwards. Check if all content displays correctly and that the intended texts and elements can be edited.

If, for example, a text cannot be edited, check its HTML structure. If normal text is directly in a div container, it may be advisable, depending on the structure, to move the text into a suitable p element.

Screenshot Placeholder: Completed homepage after inserting and arranging the sections – dev_bootstrap_import_fertige_startseite.jpeg. Take the image and then embed it here.

13. Why the layout is divided

By separating the header, footer, layout frame, and individual sections, you do not have to continually copy these components from the original Bootstrap file for new pages.

The central header and footer can be reused, while the individual page sections are available as flexible templates in the editor. This allows you to create different pages from a Bootstrap template and change the order of content at any time.

Summary

For the Bootstrap 5 import, use the original files under bx_Import as a template. Header and footer are transferred separately to the designated CMS areas, the main area is broken down into individual templates via SectionTemplate.txt, and the remaining HTML frame is saved under 00_layout → LayoutHTML.

After that, select the layout in the page settings and assemble the page from the imported sections using Insert → Page Section. Finally, check all paths, CSS, and JavaScript references as well as the editability of the individual sections.

FAQ

what customers often ask us

Why does the original Bootstrap template remain under bx_Import?

The bx_Import folder serves as a starting point and reference for the imported original template. The required components are transferred from it to the respective CMS areas.

Which file do I use for the first import?

In this tutorial, index.html is used as the starting point. From it, the header, footer, main sections, and the remaining layout frame are separated.

How do I quickly find the header and footer in the HTML code?

Use Ctrl + F and search for header or footer, for example. In templates without the corresponding HTML tags, you need to examine the surrounding div structures more closely.

Where are the individual page sections stored?

The templates are saved under bx_Layout in SectionTemplate.txt and separated by the delimiter .

Which brands require LayoutHTML?

At the positions of the separated areas, you use __DB_Layout_Header__, __DB_Layout_Main__ and __DB_Layout_Footer__.

Why are CSS and JavaScript files marked with __FV_?

This allows the CMS to consider the file version or modification date when rendering. After a change, the browser can load the current file instead of using an outdated cached version.

Why is the homepage initially empty after the layout import?

The layout only provides the framework initially. The actual page sections must be inserted into the page via Insert → Page Section.

Can I reuse an imported page section multiple times?

Yes. The separated section templates can be inserted, moved, and reused multiple times in the editor as needed.

What should I do if relative image or link paths do not work?

Check local href and src paths and add a leading slash if necessary. You can replace recurring paths with Ctrl + H, but do not blindly change external URLs, anchors, and other special paths.

What can I do if a text cannot be edited in the editor?

Check the HTML structure of the relevant section. If normal text is placed directly in a div container, a suitable p element may be appropriate depending on the structure.

How can I compare the original page while rebuilding?

Open the original index.html under Files → bx_Import via the preview and use it as a reference for the order and structure of the sections.

CMS