public function render()
    {
        parent::render();

        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        $oAttr = oxNew(\OxidEsales\Eshop\Application\Model\Attribute::class);
        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();

        // copy this tree for our article choose
        if (isset($soxId) && $soxId != "-1") {
            // generating category tree for select list
            $this->_createCategoryTree("artcattree", $soxId);
            // load object
            $oAttr->loadInLang($this->_iEditLang, $soxId);

            //Disable editing for derived items
            if ($oAttr->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            $oOtherLang = $oAttr->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oAttr->loadInLang(key($oOtherLang), $soxId);
            }

            // remove already created languages
            $aLang = array_diff(\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames(), $oOtherLang);
            if (count($aLang)) {
                $this->_aViewData["posslang"] = $aLang;
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }
        }

        $this->_aViewData["edit"] = $oAttr;

        if ($myConfig->getRequestParameter("aoc")) {
            $oAttributeMainAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\AttributeMainAjax::class);
            $this->_aViewData['oxajax'] = $oAttributeMainAjax->getColumns();

            return "popups/attribute_main.tpl";
        }

        return "attribute_main.tpl";
    }