clickstorm / cs_seo

[clickstorm] SEO
Other
33 stars 49 forks source link

Crop Title Tag Function #195

Closed in-session closed 5 years ago

in-session commented 6 years ago

Small idea:

output the title tag with cropping based on the configuration setting

Clickstorm\CsSeo\UserFunc\PageTitle.php

// get extension configurations
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cs_seo']);

if ($page['tx_csseo_title_only'] == '0') {
            $title = $this->TSFE->getFinalTitle(mb_strimwidth( $title, 0, $extConf['maxTitle'], "…"), $page['tx_csseo_title_only']);
} else {
            $title = $this->TSFE->getFinalTitle( $title, 0, 70);
}
mhirdes commented 6 years ago

Hey. thanks for the idea. Then we also need an option to active this and to set the appending characters. if you like, you can add this and send a pull request

tobiasgraeber commented 6 years ago

If you toggle the checkbox "tx_csseo_title_only" to off / on (multiple times) the title is not updated correctly in the snippet preview - version 3.02 - maybe you could fix/improve that also?

mhirdes commented 5 years ago

Please provide a pull request if you really need this. In my opionion Google and search engines crops the title aumotically, if it is to long.