No classnames in create-dropdown

Hide the classnames from the CMS 'create' dropdown

Small hack to change how ClassNames are added to the pagetype dropdown in the CMS.

When the CMS is set to a locale different from en_US, the classnames are added between parentheses to the list of pagetypes in the (create page) pagetype dropdown. The reason being that, as pagetypes are translated, you might forget what classes they represent. Since pagetype names might be 'translated' for en_US locale as well, it doesn't really make sense to do this only for other locales. Besides that, I think it's really only interesting for developers, so I'd propose: administrators only, on all locales.

This has to be a simple hack, there's no (sensible) way to do this extending or decorating things...


In /cms/code/ (line354) remove:

if(i18n::get_locale() != 'en_US') {
    $addAction .= " ({$class})";

And replace by this:

if(Member::currentUser()->isAdmin()) {
    $addAction .= " ({$class})";


Het versturen van reacties is uitgeschakeld.

RSS feed voor reacties op deze pagina