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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Custom Page Types in CMS


Go to End


2 Posts   1582 Views

Avatar
bartvanirsel

Community Member, 96 Posts

13 July 2009 at 7:17am

Hi,

I am trying to get my custom page type to be displayed in the CMS with a custom name.

Managed to do this by using the language file in this way:
$lang['nl_NL']['PortfolioPage']['SINGULARNAME'] = "Portfolio Pagina";

In the CMS the folowing gets dispayed:

Portfolio Pagina (PortfolioPage)

Is there a way to get rid of: (PortfolioPage)? Is there a way to directly set the SINGULARNAME in the PortfolioPage class in PortfolioPage.php?

Best regards,

Bart

Avatar
bartvanirsel

Community Member, 96 Posts

18 July 2009 at 2:56am

Figured it out myself, in facts it's very easy.

In the Model class add:

static $add_action = 'name of the page type';