10378 Posts in 2194 Topics by 1710 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 934 Views |
-
Image_Gallery - Renaming Tabs

19 September 2010 at 1:05pm
My first post - hooray!! This forum community has helped me over the years, but this one has got me beat.
I am trying to rename the tabs in the Image Gallery module without changing the core code. I have tried of few different methods, the last being: $fields->fieldByName('Root.Content.Albums')->setTitle('Potfolio'). Is it possible to rename the tabs?
Thanks in advance
-
Re: Image_Gallery - Renaming Tabs

20 September 2010 at 2:33am
You're doing this in a subclass?
---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com -
Re: Image_Gallery - Renaming Tabs

20 September 2010 at 4:43am
Thanks for the reply ...
Yes, I believe so. I subclassed ImageGalleryPage as shown below to add several new fields to the Album class.
class ClientImageGalleryPage extends ImageGalleryPage {
protected $albumClass = "ClientImageGalleryAlbum";
}then tried to override a few variables either do a
public function getCMSFields($cms) {$albums = _t('ImageGalleryPage.ALBUMS','Portfolios');
$f = parent::getCMSFields($cms);
$f->addFieldToTab("Root.Content.$configuration", new HeaderField($title = _t('ImageGalleryPage.ALBUMCOVERIMAGES','Portforlio cover images'), $headingLevel = "6"));and a few ..
$manager->setAddTitle(_t('ImageGalleryPage.ALBUM','an Portfolio'));
$manager->setSingleTitle(_t('ImageGalleryPage.ALBUM','Portfolio'));
...or
...
public function getCMSFields($cms) {
$f = parent::getCMSFields($cms);
$f->fieldByName('Root.Content.Albums')->setTitle('Potfolio')....
That did not work either. Is there's a better way?
-
Re: Image_Gallery - Renaming Tabs

21 September 2010 at 1:53am
Is "dataobjectdecorator" the right way to this?
| 934 Views | ||
|
Page:
1
|
Go to Top |

