[TYPO3] display header when title is empty

PEF xx at xx.xx
Fri Jun 15 13:31:17 CEST 2007


Thanks Loek,

I little bit of work on the issue, has made me able to state the problem 
a little bit clearer.

As you mentioned,
 > lib.stdheader.stdWrap.fieldRequired >
will affect evry empty header, and that's not my intention

What I want is to be able to gain control on a particular header, by 
i.e. setting it to a certain value.

I'm able to do the trick like this - but it's ugly:
lib.stdheader.10.6 = TEXT
lib.stdheader.10.6 {
    current=1
    insertData=1
    fontTag=<h1 
style="font-size:0px;"{register:headerStyle}{register:headerClass}>|</h1>
}

Create an extra header-type and set the font-size to zero.

There must be a more nice way to do it.

Regards
Peter


Loek Hilgersom skrev:
> I think you need to solve 2 issues:
> 
> 1. Typo3 won't output the div and h1 tags when the header field is 
> empty. To solve this you can set:
> 
> lib.stdheader.stdWrap.fieldRequired >
> 
> Be aware that this will affect all empty headers! If you don't want that 
> to happen you'll have to be more specific e.g. only headers of CE-type 
> text:
> 
> tt_content.text.10.stdWrap.fieldRequired >
> 
> Best would be to specify this only for csc-firstHeader items, but that 
> requires more complex TS fiddling.
> 
> 2. Browsers will set the height of the h1 to zero when the contents are 
> empty, so you'll have to set the height explicitly:
> 
> .csc-firstHeader {background: url(...);height: 2em;}
> 
> Hth,
> Loek
> 
> 
> PEF wrote:
>> Hi,
>>
>> I've put a background-image in my csc-firstHeader and what to display 
>> this image even though the title field is empty.
>>
>> Tried to put an &nbsp; in the title field with no luck and I've also 
>> tried to put a char 255 (typed from the numeric keyboard) - also with 
>> no luck.
>>
>> Anyone with a good idea to solve the problem?
>>
>> Regards
>> peter Falk


More information about the TYPO3-english mailing list