PHP code example of alexstack / silverstripe-custom-bootstrap4-theme
1. Go to this page and download the library: Download alexstack/silverstripe-custom-bootstrap4-theme library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexstack / silverstripe-custom-bootstrap4-theme example snippets
<!-- PageFooter Start -->
<% if $SiteConfig.PageFooter %>
$SiteConfig.PageFooter
<% else %>
<% with $Page("PageFooter") %>
$Content
<% end_with %>
<% end_if %>
<!-- PageFooter End -->
<!-- PageTop Start -->
<% if $SiteConfig.PageTop %>
$SiteConfig.PageTop
<% else %>
<% with $Page("PageTop") %>
$Content
<% end_with %>
<% end_if %>
<!-- PageTop End -->
<% loop $Menu(1) %>
<li class="nav-item <% if $Children %>dropdown<% end_if %> <% if $isCurrent %>active<% end_if %>">
<% if $Children %>
<a class="nav-link dropdown-toggle" href="$Link" id="drop{$ID}" role="button"
aria-haspopup="true" aria-expanded="false" data-toggle="dropdown" >
$MenuTitle.XML
<span class="icon d-none d-lg-inline icon-down-arrow"></span>
<span class="icon opener d-lg-none icon-down-arrow"></span>
<span class="sr-only">(current)</span></a>
<% if $Children %>
<div class="dropdown-menu" aria-labelledby="drop{$ID}">
<% loop $Children %>
<a class="dropdown-item" href="$Link">$MenuTitle.XML</a>
<% end_loop %>
</div>
<% end_if %>
<% else %>
<a class="nav-link" href="$Link">$MenuTitle.XML</a>
<% end_if %>
</li>
<% end_loop %>
<% if $SiteConfig.TopLogo %>
<img src="$SiteConfig.TopLogo.URL" class="top-logo" />
<% else %>
<img src="https://via.placeholder.com/250x70/ebf0f5/000000/?text=Top+Logo" class="top-logo" />
<% end_if %>
<% if $Top.BannerImage %>
<div class="text-center top-banner" style="background-image: url($Top.BannerImage.URL);" >
</div>
<% end_if %>
<!-- Custom CSS -->
<% if $SiteConfig.CustomCssFile != '' %>CustomCssFile
<%