[TYPO3] TS: Supply minW/minH with a value from a register
JoH
info at cybercraft.de
Mon Mar 13 01:14:31 CET 2006
> I have used <hX> tags, but my GIFBUILDER images are enclosed as <img>
> tags between <hX> and </hX>, and not used as background images for
> the <hX> tag. You are right, using them as background images would
> open the possibility to nicely crop the image width by CSS settings,
> but I there is no possibility to set any alt and title attributes for
> background images, and I don't see how I could feed in an alternative
> text (e.g. for screen readers). Maybe I am overlooking an ingenious
> possibility here to put the plain text between the <hX> and </hX> and
> visually hiding it using CSS, but currently I do not see such a
> solution. Please tell me, whether I am overlooking something here.
<h1 class"myclass" style="background:url(gifbuilderimage.png) no-repeat;">
<span>
Plain text goes here
</span>
</h1>
Now you can hide the span using CSS (don't use visibility, since this won't
read on screenreaders anymore)
h1.myclass {
display:block;
width:456px;
height:123px;
line-height:30px;
}
h1.myclass span {
display:block;
width:1px;
height:1px;
line-height:30px;
overflow:hidden;
}
You could use innerWrap and it's stdWrap properties to create the whole wrap
including tags and plaintext around your image.
innerWrap.cObject = COA
innerWrap.cObject {
10 = TEXT
10.value = <h1 class"myclass" style="background:url(|) no-repeat;">
20 = TEXT
20.dataWrap = <span>{field:title}</span></h1>
}
> Beside that, I am advocating the general availability of stdWrap
> properties for any data type because there will be many other
> scenarios where you will have to insert a value from a register into
> a prop or where you will want to prioriCalc a given value before
> using it for a prop (like with the now solved minW and maxW props I
> started this thread with).
> The examples I provided here are definitely just the tip of the
> iceberg. I found myself in the situation of longing for a nonexisting
> stdWrap more than 10 times during the last week - working on the
> design I posted here.
Did you ever try Dan Frosts ObTS Extension?
Should be possible to do such things with it.
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
More information about the TYPO3-english
mailing list