Skip navigation
2
Apr 08 2008

TYPO3 SEO removing comments

As I’m somewhat picky about the code produced on my sites I was really keen to remove the comments describing each TYPO3 content element. This is the sort of thing I mean:

<!--  CONTENT ELEMENT, uid:122/textpic [begin] -->
<a id="c122"></a>
<!--  Header: [begin] -->
<div class="csc-header csc-header-n1">
<h2 class="csc-firstHeader">
Time-served Designer & Webmaster available for challenging permanent positions and short-term contracts.
</h2>
</div>
<!--  Header: [end] -->
<!--  Image block: [begin] -->
<div class="csc-textpic-text">
<!--  Text: [begin] -->...

The simple addition of this TypoScript snippet in the Setup of the root template disables comment output for a cleaner source:

?View Code TYPOSCRIPT
config.disablePrefixComment = 1

Here are the new results:

<a id="c122"></a>
<div class="csc-header csc-header-n1">
<h2 class="csc-firstHeader">
Time-served Designer &amp; Webmaster available for challenging permanent positions and short-term contracts.
</h2>
</div>
<div class="csc-textpic-text">...

Note that the following TYPO3SEARCH comments are unaffected by the tweak and require hacking the source file of Templavoila.

<!--TYPO3SEARCH_begin-->
<!--TYPO3SEARCH_end-->

You can learn how to remove the TYPO3SEARCH comment here.
The typo3pwnage site has ceased to exist – my advice is leave the TYPO3SEARCH comments alone as you’ll need them to implement site search.

2 responses so far ↓

  • 1 TYPO3 SEO // Jan 29, 2009 at 2:54 pm

    here you can find some other tipps about SEO with TYPO3, its in german though:

    http://loglan.net/blog/artikel/view/seo-und-typo3/1232728271/

  • 2 SEO Miami // Jul 18, 2011 at 4:18 pm

    If you’re thinking about hiring an SEO, the earlier the better. A great time to hire is when you’re considering a site redesign, or planning to launch a new site. That way, you and your SEO can ensure that your site is designed to be search engine-friendly from the bottom up. However, a good SEO can also help improve an existing site.

Leave a Comment