markocupic / gallery_creator
Contao开源CMS的画廊扩展
6.2.4.alpha
2017-12-22 11:21 UTC
Requires
- php: >=5.3.2
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core: >=3.5.1 || ~4.3
Replaces
- contao-legacy/gallery_creator: 6.2.4.alpha
This package is auto-updated.
Last update: 2024-09-22 22:15:33 UTC
README
https://github.com/markocupic/gallery-creator-bundle
Gallery Creator
Contao 3的前端模块
该模块可以管理创建相册。该模块非常灵活,提供相册概览和详情视图。
"gc_generateFrontendTemplate"-钩子
使用"gc_generateFrontendTemplate"-钩子可以调整前端输出。在处理Gallery Creator前端模板之前执行"gc_generateFrontendTemplate"-钩子。它传递模块对象,在详情视图中传递当前相册对象。期望返回模板对象。自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; } }
使用Gallery Creator祝你玩得开心!!!