[TYPO3-english] Modification of static templates

Tomasz Melcer nospam.liori at o2.pl
Fri Mar 4 16:53:51 CET 2011


Hello,

I am using TYPO3 4.5.0.

My CSS design requires me to wrap contents of content elements (but not
their headers!) in something like:

#v+
  <div class="c1">
    <div class="c2"> <!-- header --> </div>
    <div class="c3">
      <!-- here the content element contents -->
      <p>...</p>
      <p>...</p>
    </div>
    <div class="c4" />
  </div>
#v-

It currently looks this way:

#v+
  <div class="c1">
    <div class="c2"> <!-- header --> </div>
    <!-- below: content, not wrapped into a one DIV -->
    <p>...</p>
    <p>...</p>
  </div>
#v-

I use css_styled_content, which defines how all the standard content
elements are represented in HTML. From what I see, it nicely wraps
headers in the same way for each standard content element. But I don't
see any easy way to do the same with the content itself.

I am thinking of few solutions:

 * Just edit the css_styled_content TS in the source code -- but I would
probably have problems when I'll be ready to update TYPO3?

 * Copy css_styled_content to a new record and ignore the standard one.

 * Monkey-patch css_styled_content in the places where it defines rules
for specific elements.

I feel I don't have enough experience yet to decide which one will give
me least problems.

Do you have any suggestions? Which way should I follow?

Thanks,

Tomasz Melcer


More information about the TYPO3-english mailing list