Skip navigation

TYPO3 SEO removing comments

April 8th, 2008 by Matt Bracewell · No 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:

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.

Tags: Geeky · TYPO3

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment