php-lion / theme-sb-modernbusiness
PhpLion Theme - Start Bootstrap Modern Business - A Symfony bundle providing the Start Bootstrap Modern Business template for business websites
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
Type:symfony-bundle
pkg:composer/php-lion/theme-sb-modernbusiness
Requires
- php: >=8.3
- composer/semver: ^3.0
- php-lion/navigation: ^1.0
- symfony/deprecation-contracts: ^2.1|^3
- symfony/filesystem: ^7.1
- symfony/http-client: ^6.4|^7.0
- symfony/webapp-pack: ^1.3
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.6
- symfony/asset: ^6.4|^7.0
- symfony/browser-kit: ^6.4|^7.0
- symfony/console: ^6.4|^7.0
- symfony/css-selector: ^6.4|^7.0
- symfony/event-dispatcher-contracts: ^3.0
- symfony/finder: ^6.4|^7.0
- symfony/framework-bundle: ^6.4|^7.0
- symfony/http-foundation: ^6.4|^7.0
- symfony/http-kernel: ^6.4|^7.0
- symfony/phpunit-bridge: ^6.4|^7.0
- symfony/web-link: ^6.4|^7.0
Conflicts
- symfony/framework-bundle: <6.4
This package is not auto-updated.
Last update: 2025-10-29 06:18:38 UTC
README
A Symfony bundle providing the Start Bootstrap Modern Business theme as a ready-to-use business website template.
Description
This bundle integrates the popular Modern Business template into Symfony applications, offering a modern, professional Bootstrap 5-based website design perfect for business websites, portfolios, blogs, and landing pages.
Features
- Modern Business Design - Clean, professional Bootstrap 5 website template
- Responsive Layout - Fully responsive design for all devices
- Multiple Page Templates - Homepage, About, Contact, Pricing, FAQ, Blog, and Portfolio pages
- Blog System - Blog listing and detail page templates
- Portfolio Showcase - Portfolio overview and item detail pages
- FontAwesome Icons - Comprehensive icon set included
- Symfony Integration - Seamless integration with Symfony's Asset Mapper
- Navigation Attributes - Automatic menu generation using PHP attributes
Requirements
- PHP >= 8.3
- Symfony >= 6.4 or 7.0+
- Composer
Installation
composer require php-lion/theme-sb-modernbusiness
Configuration
1. Register the Bundle
The bundle should be automatically registered via Symfony Flex. If not, add it to config/bundles.php:
return [
    // ...
    PhpLion\Theme\SbModernBusinessBundle\PhpLionSbModernBusinessBundle::class => ['all' => true],
];
2. Compile Assets
php bin/console asset-map:compile
Demo Pages (Optional)
The bundle includes example pages to showcase the theme. To enable them, add the bundle routes to your config/routes.yaml:
phplion_theme_sb_modernbusiness:
    resource: '@PhpLionSbModernBusinessBundle/config/routes.yaml'
All demo pages will then be accessible under the /_phplion/theme/sb_modernbusiness prefix:
Main Pages
- /or- /index- Homepage with hero section and features
- /about- About Us page
- /contact- Contact page with form
- /pricing- Pricing page with pricing tables
- /faq- FAQ page with accordion
Blog Pages
- /blog_home- Blog listing page
- /blog_post- Blog post detail page
Portfolio Pages
- /portfolio_overview- Portfolio grid overview
- /portfolio_item- Portfolio item detail page
Usage
Using the Base Template
Extend the base template in your own Twig files:
{% extends '@PhpLionSbModernBusiness/base.html.twig' %}
{% block content %}
    <section class="py-5">
        <div class="container px-5">
            <h1>My Business Page</h1>
            <p>Your content here</p>
        </div>
    </section>
{% endblock %}
Navigation System
The bundle uses PHP attributes for automatic navigation generation:
use PhpLion\NavigationBundle\Attribute\Navigation;
use PhpLion\NavigationBundle\Attribute\NavigationGroup;
#[NavigationGroup(name: '_phplion_theme_sb_modernbusiness')]
class MyBusinessController extends AbstractController
{
    #[Route('/services', name: 'business_services')]
    #[Navigation(path: 'Services', priority: 1500)]
    public function services(): Response
    {
        return $this->render('@PhpLionSbModernBusiness/page/services.html.twig');
    }
}
Hierarchical Navigation
Create nested menu items using the pipe separator:
#[Navigation(path: 'Blog|Latest Posts', priority: 1000)]
// Creates: Blog > Latest Posts
Template Blocks
Available blocks for customization:
- title- Page title
- stylesheets- Additional CSS files
- body_class- Body CSS classes
- navigation- Top navigation menu
- content- Main content area
- footer- Footer section
- javascripts- Additional JavaScript files
Asset Structure
assets/
├── css/
│   └── styles.css          # Main theme stylesheet
├── js/
│   └── scripts.js          # Theme JavaScript
├── images/                 # Theme images and placeholders
└── vendor/                 # Third-party assets
Template Structure
templates/
├── base.html.twig          # Base layout
├── navigation.html.twig    # Navigation component
├── footer.html.twig        # Footer component
└── page/
    ├── index.html.twig     # Homepage
    ├── about.html.twig     # About page
    ├── contact.html.twig   # Contact page
    ├── pricing.html.twig   # Pricing page
    ├── faq.html.twig       # FAQ page
    ├── blog.html.twig      # Blog listing
    ├── blog/
    │   └── post.html.twig  # Blog post detail
    ├── portfolio.html.twig # Portfolio overview
    └── portfolio/
        └── item.html.twig  # Portfolio item detail
Page Examples
Homepage Features
- Hero section with call-to-action
- Feature highlights
- Testimonials section
- Call-to-action footer
Blog Features
- Blog post grid/list
- Post categories and tags
- Sidebar with widgets
- Post pagination
Portfolio Features
- Portfolio grid layout
- Filterable categories
- Lightbox image viewing
- Project details page
Customization
Override Templates
Create your own templates in templates/bundles/PhpLionSbModernBusinessBundle/:
templates/
└── bundles/
    └── PhpLionSbModernBusinessBundle/
        └── base.html.twig  # Your customized base template
Custom Styling
Add your own CSS after the theme's stylesheet:
{% block stylesheets %}
    {{ parent() }}
    <link href="{{ asset('css/my-custom-business.css') }}" rel="stylesheet" />
{% endblock %}
Navigation Customization
Override the navigation block to customize the menu:
{% extends '@PhpLionSbModernBusiness/base.html.twig' %}
{% block navigation %}
    {# Your custom navigation #}
{% endblock %}
Adding Custom Sections
Extend page templates to add new sections:
{% extends '@PhpLionSbModernBusiness/page/index.html.twig' %}
{% block content %}
    {{ parent() }}
    <section class="py-5 bg-light">
        <div class="container px-5">
            <h2>Custom Section</h2>
            <p>Additional content</p>
        </div>
    </section>
{% endblock %}
Best Practices
Images
Replace placeholder images with your own:
<img src="{{ asset('images/my-business-hero.jpg') }}" alt="Hero" />
SEO
Customize meta tags in your templates:
{% block title %}My Business - Professional Services{% endblock %}
{% block head %}
    {{ parent() }}
    <meta name="description" content="Your business description">
    <meta name="keywords" content="business, services, professional">
{% endblock %}
Forms
Integrate Symfony forms in contact and other pages:
{{ form_start(contactForm) }}
{{ form_widget(contactForm) }}
<button type="submit" class="btn btn-primary">Send Message</button>
{{ form_end(contactForm) }}
License
MIT License - see LICENSE file for details
Credits
- Original Template: Start Bootstrap - Modern Business
- Bootstrap 5: https://getbootstrap.com/
- FontAwesome: https://fontawesome.com/
Support
For issues and questions:
- Homepage: https://www.php-lion.de
- Email: info@php-lion.de
Original Template
This bundle is based on the Modern Business template by Start Bootstrap, licensed under the MIT License. The original template can be found at: https://startbootstrap.com/template/modern-business