Download the PHP package tecnodesignc/adsense-module without Composer
On this page you can find all versions of the php package tecnodesignc/adsense-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tecnodesignc/adsense-module
More information about tecnodesignc/adsense-module
Files in tecnodesignc/adsense-module
Package adsense-module
Short Description Adsense module for EncoreCMS
License MIT
Informations about the package adsense-module
Adsense Module
Special Thanks
to Nicolas Widart for EncoreCMS and his Menu Module, that was used as a foundation for the Adsense Module.
Installation
You can install Adsense module using composer:
composer require tecnodesignc/adsense-module
After the module is installed, you have to give yourself access in EncoreCMS (using Roles/Permissions). New Space item will appear in the Sidebar
Usage
Prerequisites
By default, Space module is created using Bootstrap Carousel http://getbootstrap.com/javascript/#carousel so make sure you have all prerequisites loaded for standard Bootstrap carousel (Bootstrap Carousel CSS and JS)
Basic Usage
You can create basic Space using the EncoreCMS admin interface - you can create and name your space (pay attention to the System Name field here, it is used later for rendering), and create individual ads. Ads can be linked to images in the Media module, or have URL pointing to external image. They can also contain hyperlink to any page on the site, fixed URI or URL.
When the space is created, you can render it in your template using {!! Space::render('space_system_name') !}}
Advanced Usage
Use your own space template
If you want to change rendering of your space, use custom HTML, CSS classes, etc, you can pass a Blade template
name as a second parameter to the render()
method, i.e.
{!! Space::render('space_system_name', 'space/my-own-space') !}}
Template may look like this:
You will have Modules\Adsense\Entities\Space
instance available in the $space
variable
Provide your own Space instance
You can also pass a Modules\Adsense\Entities\Space
instance as a first parameter instead of the
space system_name
to render dynamically created space.
First, create instance of your space and add ads in your controller and pass it to the view
then, inside of the homepage.blade.php
template, you can render space using {!! Adsense::render('system_name', 'template) !!}
Resources
- License
- Encore Documentation