Contao CMS Extension for aos.
- PHP >=7.2
- Contao >=4.9 LTS
Simply use the PaletteManipulator
to add the Animate-On-Scroll Palette to your Content Elements.
\Contao\CoreBundle\DataContainer\PaletteManipulator::create()
->addLegend('aos_legend', 'template_legend', PaletteManipulator::POSITION_AFTER)
->addField('addAOS', 'aos_legend', PaletteManipulator::POSITION_APPEND)
->applyToPalette('myContentElement', 'tl_content')
;
NOTE:
Replace myContentElement
with the name of the palette of your content element.
When using the managed edition it's pretty simple to install the package. Just search for the package in the Contao Manager and install it. Alternatively you can use the CLI.
# Using the contao manager
$ php contao-manager.phar.php composer require markenzoo/contao-animate-on-scroll-bundle
# Using composer directly
$ php composer.phar require markenzoo/contao-animate-on-scroll-bundle
# Using global composer installation
$ composer require markenzoo/contao-animate-on-scroll-bundle
If you use Contao in a symfony application without contao/manager-bundle, you have to register the bundle manually:
class AppKernel
{
public function registerBundles()
{
$bundles = [
// ...
new Markenzoo\ContaoAnimateOnScrollBundle\ContaoAnimateOnScrollBundle()
];
}
}
Run the PHP-CS-Fixer and the unit test before you release your bundle:
composer run-script fix -v
composer run-script lint
composer run-script test