Download the PHP package heimrichhannot/contao-share without Composer
On this page you can find all versions of the php package heimrichhannot/contao-share. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heimrichhannot/contao-share
More information about heimrichhannot/contao-share
Files in heimrichhannot/contao-share
Package contao-share
Short Description A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.
License LGPL-3.0-or-later
Homepage https://github.com/heimrichhannot/contao-share
Informations about the package contao-share
Share
A helper module for pdf-print, print and social share functionality based on bootstrap to custom modules.
Features
- news & calendar support
- add syndication to modules and articles
- syndication options:
- print pdf
- print by a custom module template or call the default browser print fun
- ical-event
- mailto
- feedback
- facebook share
- twitter share
- googleplus share
Usage
Setup for modules
Add Share to your module palette
Add {share_legend},addShare;
to your model default palette.
Example:
Generate share output
To show the share buttons in your module, you need to add the return of Settings->generate()
to your template.
Example:
Add Share urls to your template
This will add an array to the template with following key containing just the urls:
- mailto
Setup for articles
Since version 1.5 you can also print complete articles.
-
Setup a new model, which has share enabled (=has addShare added to the module palette, the module type doesn't matter). This module will hold the settings for the article.
-
Check "Add Syndication" on the article settings page and choose the module setup before.
- Echo
$this->share
in your article template.
Custom name for your pdf files
Your module has to implement ModulePdfReaderInterface
. The return-value of getFileName()
is used as pdf file name. Don't add .pdf, it will be added by the module itself.
1
Print page
To address your custom module print layout, the url must contain the print
parameter with the module id as value. (Example: ?print=57
).
The default print link will do that for you and will create a new tab/window and close it immediately after the window was printed by the user.
To debug the print layout, add the pDebug=1
parameter to your print url (Example: ?print=57&pDebug=1
).
For regions within your templates that should not be printable, add <!-- print::stop -->
before that region and <!-- print::continue -->
afterwards.
It is also possible to simple call the browser print windows to print the complete page by checking 'printWithoutTemplate' withing the syndication selection in module settings.
All versions of contao-share with dependencies
ausi/slug-generator Version ^1.1
contao/core-bundle Version ^3.5.1 || ~4.1
contao-community-alliance/composer-plugin Version ~2.4 || ~3.0
heimrichhannot/contao-request Version ^1.1
kigkonsult/icalcreator Version ^2.22