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.

Archive /

Our old forums are still available as a read-only archive.

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

Changing the name of a page type


Reply


5 Posts   2096 Views

Avatar
artemb

Community Member, 11 Posts

27 July 2008 at 10:30pm

Hi, everybody!

I need to change the name of a page type from one that is generated from the class name to a more sensible one. How can I do this? I've tried setting the $add_action of the page type class, but it doesn't help.

p.s. I mean the name that is displayed in the "create" dropdown

Avatar
Phalkunz

69 Posts

29 July 2008 at 4:24pm

Well, you can create pretty much any name you like with class name.

Avatar
artemb

Community Member, 11 Posts

29 July 2008 at 11:02pm

Just found a way. You have to have a translation like this:

$lang['en_US']['MegaPage']['SINGULARNAME'] = "Super duper page";

Avatar
Phalkunz

69 Posts

29 July 2008 at 11:23pm

Well, you use that but it's used for translation purpose. You can always do this

class SuperDuperPage extends Page {
...
}

Avatar
artemb

Community Member, 11 Posts

30 July 2008 at 12:33am

That's not flexible enough. This way I can make localized, formatted and all kinds of display names