Created
May 1, 2022 13:04
-
-
Save pepebe/f8bf0d9e499706f39f7a945f68700277 to your computer and use it in GitHub Desktop.
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: | |
* [email protected] | |
* | |
* 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