Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Customising Labels - ImageGallery: SOLVED


Reply

2 Posts   655 Views

Avatar
pinkp

13 April 2010 at 2:13am (Last edited: 13 April 2010 8:41am), Community Member, 168 Posts

What is the best way to change the labels of the ImageGallery. I need to customise it like so:

ImageGalleryAlbum.php

public function getCMSFields_forPopup()
   {
      return new FieldSet(
         new TextField('AlbumName', _t('ImageGalleryAlbum.ALBUMTITLE','Artist Name')),
         new TextareaField('Description', _t('ImageGalleryAlbum.DESCRIPTION','Artist Statement')),
         new ImageField('CoverImage',_t('ImageGalleryAlbum.COVERIMAGE','Artist Main Image'))
      );
   }

And also change all "album' references to "artist" the above does not seem to have any effect?

Thanks

---------------
EDIT

public function getCMSFields_forPopup()
   {
      return new FieldSet(
         new TextField('AlbumName', _t('ImageGalleryAlbum.ARTISTNAME','Artist Name')),
         new TextareaField('Description', _t('ImageGalleryAlbum.ARTISTSTATEMENT','Artist Statement')),
         new ImageField('CoverImage',_t('ImageGalleryAlbum.ARTISTMAINIMAGE','Artist Main Image'))
      );
   }

Avatar
UncleCheese

15 April 2010 at 1:46am 4085 Posts

I'm pretty sure the cleanest way to do this would have been to override the lang file.

$lang[your_Locale]['ImageGalleryAlbum']['ALBUMTITLE'] = "My Label";