diff --git a/_config/extensions.yml b/_config/extensions.yml index cc60d89..2fbf99c 100644 --- a/_config/extensions.yml +++ b/_config/extensions.yml @@ -10,6 +10,9 @@ SiteConfig: LeftAndMain: extensions: ['TranslatableCMSMainExtension'] +LeftAndMain_TreeNode: + extensions: + ['TranslatableCMSTreeNodeExtension'] HtmlEditorField_Toolbar: extensions: ['TranslatableEditorToolbarExtension'] diff --git a/code/controller/TranslatableCMSTreeNodeExtension.php b/code/controller/TranslatableCMSTreeNodeExtension.php new file mode 100644 index 0000000..dd7d0ce --- /dev/null +++ b/code/controller/TranslatableCMSTreeNodeExtension.php @@ -0,0 +1,30 @@ +forTemplate()} in order to show the original page name on mouseover. + * + * @todo Make it more flexible, because right now it's a simple copy-paste with changes + * + * @return String + */ + public function forTemplate() { + $obj = $this->owner->obj; + $original_pagename = ' (original page name: coming soon!)'; + + return "
  • ID\" data-id=\"$obj->ID\" data-pagetype=\"$obj->ClassName\" class=\"" + . $this->getClasses() . "\">" . " " + . "getLink() . "\" title=\"(" + . trim(_t('LeftAndMain.PAGETYPE','Page type'), " :") // account for inconsistencies in translations + . ": " . $obj->i18n_singular_name() . ") {$obj->Title}$original_pagename\" > " + . "{$obj->TreeTitle}"; + } + +}