markocupic/gallery_creator
Composer 安装命令:
composer require markocupic/gallery_creator
包简介
Gallery extension for the Contao Open Source CMS
README 文档
README
https://github.com/markocupic/gallery-creator-bundle
Gallery Creator
Frontend Modul für Contao 3.
Mit dem Modul lassen sich Alben verwalten und erstellen. Das Modul ist sehr flexibel und bietet eine Albenübersicht und eine Detailansicht.
"gc_generateFrontendTemplate"-Hook
Mit dem "gc_generateFrontendTemplate"-Hook lässt sich die Frontend-Ausgabe anpassen. Der "gc_generateFrontendTemplate"-Hook wird vor der Aufbereitung des Gallery-Creator-Frontend-Templates ausgeführt. Er übergibt das Modul-Objekt und in der Detailansicht das aktuelle Album-Objekt. Als Rückgabewert wird das Template-Objekt erwartet. Hinzugefügt in Version 4.8.0.
<?php // config.php $GLOBALS['TL_HOOKS']['gc_generateFrontendTemplate'][] = array('MyGalleryCreatorClass', 'doSomething'); // MyGalleryCreatorClass.php class MyGalleryCreatorClass extends \System { /** * Do some custom modifications * @param Module $objModule * @param null $objAlbum * @return mixed */ public function doSomething(\Module $objModule, $objAlbum=null) { global $objPage; $objPage->pageTitle = 'Bildergalerie'; if($objAlbum !== null) { // display the album name in the head section of your page (title tag) $objPage->pageTitle = specialchars($objAlbum->name); // display the album comment in the head section of your page (description tag) $objPage->description = specialchars(strip_tags($objAlbum->comment)); // add the album name to the keywords in the head section of your page (keywords tag) $GLOBALS['TL_KEYWORDS'] .= ',' . specialchars($objAlbum->name) . ',' . specialchars($objAlbum->event_location); } return $objModule->Template; } }
Viel Spass mit Gallery Creator!!!
统计信息
- 总下载量: 378
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2014-07-12