This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* seoSuiteRecoverLongtitle v:0.0.1 | |
* Last edited: 2022-05-01 | |
* | |
* AUTHOR: | |
* info@pepebe.de | |
* | |
* PLUGIN EVENT(S): | |
* OnDocFormRender | |
* | |
* DESCRIPTION: | |
* Hide META Title from view and unhide original longtitle | |
* | |
* Note: You might want to change the maximum number of characters for seosuite.meta.preview.length_desktop_title | |
* | |
**/ | |
switch($modx->event->name){ | |
case 'OnDocFormRender': | |
$html = " | |
<style> | |
/* leider notwendig */ | |
#resource-seosuite-panel .x-hide-display + label { | |
display: none; | |
} | |
</style> | |
<script type='text/javascript'> | |
Ext.onReady(function () { | |
console.log('seoSuiteRecoverLongtitle plugin loaded'); | |
let seosuiteLongtitle = Ext.getCmp('seosuite-longtitle'); | |
seosuiteLongtitle.hide(); | |
let modxResourceLongtitle = Ext.getCmp('modx-resource-longtitle'); | |
modxResourceLongtitle.show(); | |
}); | |
</script> | |
"; | |
$modx->regClientStartupHTMLBlock($html); | |
break; | |
default: | |
break; | |
} | |
/**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment