Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Customising Labels - ImageGallery: SOLVED

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 636 Views
  • pinkp
    Avatar
    Community Member
    168 Posts

    Customising Labels - ImageGallery: SOLVED Link to this post

    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'))
          );
       }

  • UncleCheese
    Avatar
    4085 Posts

    Re: Customising Labels - ImageGallery: SOLVED Link to this post

    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";

    636 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.