Banner van WebMotief :Snippets; WebMotief 2010

TYPO3: the thrive for a cleaner frontend

How to delete csc-default and id tag in TYPO3 4.3 revisited

As other people noticed too 

TYPO3 4.3 adds div's and classes which are not always wanted. The most suggested solution is:


  1. tt_content.stdWrap.innerWrap >
  • TYPO3 front end with css-default
  • TYPO3 front end with standardWrap.dataWrap >
  • TYPO3 front end cleanup with cObject >

  1. tt_content.stdWrap.innerWrap.cObject

If we get rid of that by:


  1. tt_content.stdWrap.innerWrap.cObject >

we get rid of the css-default id's and classes

but there are disadvantages to this methode, as we lose some of the nice features of using 'frame', the possibility to wrap content in classes or id's by choice.

If we use 'frame', I noticed the css-default is replaced with the class or id chosen, as expected.

This is also the solution to our problem: wrap with nothing! and thus remove the css-default.

I don't know whether it is allowed to wrap something with 'nothing' so I wrapped the content with 'the next best' 'nothing': a html comment.


  1. <!-- pure -->|<!-- pure -->
wrap with html comment

We get rid of the comments later on (see: TSref CONFIG disablePrefixComment)


In the TSConfig of the websites rootpage we add the following:


TSconfig

  1. TCEFORM.tt_content.section_frame {
  2.   removeItems = 1,5,6,10,11,12
  3.   addItems {
  4.       // 50 is just a number by choice
  5.       50 = pure
  6.        }
  7. }

Now we only have to modify the TS template:


  1. tt_content.stdWrap.innerWrap.cObject {
  2.     50 = TEXT
  3.     50.value = <!-- pure -->|<!-- pure -->
  4.     50.label = pure
  5.   }
No comments

Add comment

* - required field

*



-->

*
*


webmotief validates for XHTML 1.0

webmotief uses TYPO3