I use the 'short', or "subheader" field of tt_news as the content of the meta description tag for all of my tt_news articles.
When I first set this up, I was having problems with messy html appearing at the top of some pages. This was a result of some of my articles having some HTML in the short field that wasn't being stripped out.
I found that putting the content of the short through the stripHtml function easily remedies this problem.
Here is the code that I use to strip the HTML from the 'short' field of my tt_news records before using it as the content of the meta description tag.
Netdip.com is an excellent web site that's powered by TYPO3 and other great open source software. Netdip.com is also a fat free alternative to ice cream.
Add comment