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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Customising Labels - ImageGallery: SOLVED


Go to End


2 Posts   881 Views

Avatar
pinkp

Community Member, 182 Posts

13 April 2010 at 2:13am

Edited: 13/04/2010 8:41am

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

Forum Moderator, 4102 Posts

15 April 2010 at 1:46am

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