[Typo3] Graphic as header, but only if defined, and method to define... ?
JoH
info at cybercraft.de
Wed Jun 15 01:20:33 CEST 2005
> I want to specify an image on every page in the Page Header (similar
> to the mf_flashheader extension, but not necessarily a swf, though it
> might be swf). But if a page does not have an image defined, I want
> to simply output the page title wrapped in H1 tags.
>
> ===What I have right now...===
> A template object in typoscript with the following:
>
> # Substitute the main title hear
> subparts.header = COA
> subparts.header {
> 10 = HTML
> 10.value.field = title
> 10.value.wrap = <h1> | </h1>
> }
>
>
> Did I describe what I want to do well enough? Has anyone else already
> done this? is there an easy way to do this? hints, pointers?
Use pagetype "advanced". Upload your image there.
temp.defaultheader = TEXT
temp.defaultheader {
field = title
wrap = <h1>|</h1>
}
temp.graphicalheader = COA
temp.graphicalheader {
wrap = <div class="myheader">|<div>
10 = IMAGE
10 {
stdWrap.ifEmpty.cObject < temp.defaultheader
file {
import = uploads/media/
import.listNum = 0
import.field = media
width = 123
height = 234
}
}
}
subparts.header < temp.grahpicalheader
If the IMAGE object is empty (no image in the media field) the textual part
is used.
You might want to adjust the width and height values.
Not tested but should be working.
BTW: 10.value.field is not working. It has to be 10.value _or_ 10.field
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.openbc.com/go/invuid/Jo_Hasenau
More information about the TYPO3-english
mailing list