[TYPO3] TS: condition for dataWrap in headers
Bert Hiddink
hiddink at bendoo.com
Sat Oct 7 22:32:54 CEST 2006
Hello, Christopher!
Christopher wrote:
>>
>> Any suggestions?
>
> But again, the HTML is grotesquely invalid ;-)
>
> Why not just link both elements (the only correct way to do what
> you're trying...)
>
> -Christopher
Thank you for "showing me the light here" :). I followed your suggestion
and here is what I did:
/Challenge:/ make a header+subheader-contentelement clickable over a
larger area than the link itself.
/Solution:/ as I can't wrap a DIV in a link (which isn’t ‘legal’), the
best way to do something like this is to create the links (whatever they
contain) with a class or ID, and use CSS to tell it to display as a
block and give it width and height. Then I can position it if I need to.
/TS code:/
# Add a CSS-class to linked headers
lib.stdheader.10.setCurrent.typolink.ATagParams = class="headers"
# Wrap also subheaders with the header-link and add the same CSS-class
tt_content.header.20.typolink.parameter.field = header_link
tt_content.header.20.typolink.ATagParams = class="headers"
/Then in my CSS, I add:/
/* CSS-class for linked header so the link covers a larger area */
a.headers {display: block; width:220px; height: 20px;}
/Result:/
a header content-element with a subheader which are both clickable over
a larger area than the link itself.
/Example:/
http://aep.frontis.nl/index.php?id=90 (see blue textual banners at the
right).
Thanks again, Christopher!
grt,
-brt
--
Bert Hiddink
hiddink at bendoo.nl
BENDOO e-work solutions
http://www.bendoo.nl
Harterinkdijk 8, 7065 AR SINDEREN
The Netherlands
Tel. 0315 244525
More information about the TYPO3-english
mailing list