Bootstrap Template
TsgcHTMLTemplate_Bootstrap — wraps any HTML body content in a complete, self-contained Bootstrap 5 document with configurable theme, language and text direction.
TsgcHTMLTemplate_Bootstrap — wraps any HTML body content in a complete, self-contained Bootstrap 5 document with configurable theme, language and text direction.
The lowest-level document wrapper in sgcHTML. Assign your composed component HTML to BodyContent, configure the document-level settings, then read HTML to get a deployable, self-contained Bootstrap 5 page with embedded assets.
TsgcHTMLTemplate_Bootstrap
Full Bootstrap 5 document wrapper
Delphi, C++ Builder, .NET
Set BodyContent to your rendered component HTML, optionally configure Title, HtmlTheme and HtmlLang, then read the HTML property to get a complete, deployable page.
uses
sgcHTML_Template_Bootstrap;
var
oTemplate: TsgcHTMLTemplate_Bootstrap;
begin
oTemplate := TsgcHTMLTemplate_Bootstrap.Create(nil);
try
oTemplate.Title := 'My App';
oTemplate.HtmlTheme := 'dark';
oTemplate.HtmlLang := 'en';
oTemplate.BodyContent := oNavBar.HTML + oGrid.HTML;
Response.ContentText := oTemplate.HTML;
finally
oTemplate.Free;
end;
end;
TsgcHTMLTemplate_Bootstrap *oTemplate = new TsgcHTMLTemplate_Bootstrap(NULL);
try
{
oTemplate->Title = "My App";
oTemplate->HtmlTheme = "dark";
oTemplate->HtmlLang = "en";
oTemplate->BodyContent = oNavBar->HTML + oGrid->HTML;
Response->ContentText = oTemplate->HTML;
}
__finally { delete oTemplate; }
var template = new TsgcHTMLTemplate_Bootstrap();
template.Title = "My App";
template.HtmlTheme = "dark";
template.HtmlLang = "en";
template.BodyContent = navbar.HTML + grid.HTML;
response.ContentText = template.HTML;
The members you reach for most often.
The HTML fragment placed inside the document <body>; assign the concatenated output of your sgcHTML components here.
Text for the <title> element in the document head.
String written to data-bs-theme on the <html> element (for example 'light' or 'dark') so Bootstrap's colour system switches correctly. For automatic light / dark / system switching, plug a TsgcHTMLThemeBuilder (Mode = tmLight, tmDark or tmSystem) into the ThemeBuilder property.
lang attribute on the <html> element; defaults to 'en'. sgcHTML also ships built-in UI text localized in 17 languages, selectable with sgcHTMLSetLanguage, so components render with correct native scripts (including CJK, Cyrillic and Arabic).
String written to the dir attribute (for example 'ltr' or 'rtl') for right-to-left language support.
Extra HTML injected into <head>; use for custom <meta> tags or extra <script> references. Pair it with CustomCSS for inline <style> blocks.
| Online HelpFull API reference and usage guide for this component. | Open | |
| All sgcHTML ComponentsBrowse the full feature matrix of 60+ components. | Open | |
| Download Free TrialThe 30-day trial ships the 60.HTML demo projects. | Open | |
| PricingSingle, Team and Site licenses with full source code. | Open |