How to customize the categorizations
Hello, I installed gallery module, which I think is great. I read the description simple. But I can not find where to customize the categorizations. For example, I do not want
** substrate (canvas, paper, photo, Fabriano, etc..)
But camera (digital, disposable, reflex ...)
Can you help me, please?
Thank you very much
Re: How to customize the categorizations
Add this to the system/config/dcaconfig.php
I presume that medium is what you actually want to modify, since that is the "medium" you will be painting/photographing with. Also, I assume that you want to override the default values, so that the originals are no longer available in the drop-down.
dcaconfig.php
Code:
$GLOBALS['TL_DCA']['tl_gallery']['fields']['medium']['options'] = array('dig', 'dis', 'aslr', 'dslr', 'pol'),
langconfig.php
Code:
// Medium
$GLOBALS['TL_LANG']['tl_gallery']['dig'] = 'Digital';
$GLOBALS['TL_LANG']['tl_gallery']['dis'] = 'Disposable';
$GLOBALS['TL_LANG']['tl_gallery']['aslr'] = 'Analog SLR';
$GLOBALS['TL_LANG']['tl_gallery']['dslr'] = 'Digital SLR';
$GLOBALS['TL_LANG']['tl_gallery']['pol'] = 'Polaroid';
Re: How to customize the categorizations
Thyon thank you very much, after your mail, I found the solution (after over two days).
I made a little tutorial if it helps someone:
Customize Categorization of Contao Gallery
1 - Change the name of the table in phpMyAdmin, sure to take a simple term to avoid confusion
2 - Changing the terms of the following files:
- System \ modules \ gallery \ config \ database.sql
- System \ modules \ gallery \ dca \ tl_gallery.php
- System \ modules \ gallery \ ModuleGallery.php
- System \ modules \ gallery \ languages \ en \ tl_gallery.php
3 - Update the database contao via the install.php file
Re: How to customize the categorizations
My method doesn't required any database or install file changes and is upgrade safe. Since you are hacking at the galley files, your changes will be overwritten by any update.
Re: How to customize the categorizations
I forgot to add this line, which renames the language string for the medium column to camera:
add to system/config/langconfig.php
Code:
$GLOBALS['TL_LANG']['tl_gallery']['medium'] = array('Camera', 'choose the camera with which the photo was taken');
Its also possible to hide elements by removing them from the assignment to a user/usergroup, then the "client" won't see substrate, or other fields. In the same way you can rename Artist/Photographer to just Photographer.