alphalemon/app-business-carousel-bundle
git clone https://github.com/alphalemon/AlphaLemonCmsSandbox.git
cd AlphaLemonCmsSandbox
composer install
composer require alphalemon/app-business-carousel-bundle
app/AppKernel.php:
new AlphaLemon\BusinessCarouselBundle\AlphaLemonBusinessCarouselBundle(),
php app/console cache:clear
/admin) and locate the "Business Carousel" section under "Content Types". Click "Add" to create a new carousel.{{ alphalemon_business_carousel('carousel_id') }} in your templates to display the carousel.Content Creation Workflow:
Frontend Integration:
{# Display carousel by ID #}
{{ alphalemon_business_carousel('my_carousel_id') }}
{# Display carousel with custom settings #}
{{ alphalemon_business_carousel('my_carousel_id', {
'autoplay': true,
'speed': 500,
'pause_on_hover': false
}) }}
fetch('/api/carousel/my_carousel_id')
.then(response => response.json())
.then(data => renderCarousel(data));
Theming and Styling:
Resources/views/).Reusable Components:
{% include 'partials/carousel.html' with {
'carousel_id': 'hero_carousel',
'class': 'full-width'
} %}
{% if app.user.hasRole('PREMIUM') %}
{{ alphalemon_business_carousel('premium_carousel') }}
{% endif %}
Bundle Compatibility:
Caching Issues:
php app/console cache:clear --env=prod
# app/config/config_dev.yml
framework:
cache: false
Missing Documentation:
/src/AlphaLemon/BusinessCarouselBundle/) for undocumented features (e.g., custom slide types).app_dev.php) to inspect carousel data and rendering.Performance:
{# Lazy-load slides #}
{{ alphalemon_business_carousel('carousel_id', {'lazy_load': true}) }}
Extending Slide Types:
Slide entity:
// src/AlphaLemon/BusinessCarouselBundle/Entity/Slide.php
/**
* @ORM\Column(type="string", nullable=true)
*/
private $videoUrl;
Localization:
Resources/translations/:
# Resources/translations/messages.en.yml
carousel:
slide: "Slide"
add_slide: "Add Slide"
Testing:
./vendor/bin/phpunit -c tests/
CarouselManager service.Debugging Rendering:
{% set carousel = _context.getCarousel('my_carousel_id') %}
{{ dump(carousel) }}
{{ alphalemon_business_carousel('my_carousel_id') }}
app/logs/dev.log.Backup Slides:
php app/console doctrine:fixtures:dump --append --em=default
Custom JavaScript:
carousel-init event:
$(document).on('carousel-init', function(e, carouselId) {
console.log('Carousel initialized:', carouselId);
// Custom logic here
});
How can I help you explore Laravel packages today?