[TYPO3-dev] HTML5 and subheader in TEXT etc (again)

Bernd Wilke t3ng at pi-phi.tk
Thu Sep 15 08:58:39 CEST 2011


On 09/14/2011 08:31 PM, Robert Wildling wrote:
> Thanks for your responses!
>
> I checked some of the extenions, but they don't seem to be "complete"
> when it comes to TYPO3.
> For example: when there is the scenario where a header AND a subheader
> is needed SOMETIMES, then the h1 and h2 should not only be wrapped in a
> header element, but also in a hgroup element. But there should not be
> any hgroup, if there is only a h1.
>
> h1 is on position 10, h2 on position 15 (once it is activated in TEXT
> and TEXTPIC). Is there any chance to call an if-statement at position 10
> that puts a hgroup BEFORE h1 only when there is a h2 at 15?
> (The closing-tag is easy...)
>
> Any hints are more than welcome!

hm, what about a h2 alone?
I think you will need a more complex condition whether h1 AND h2 are set.
for a structured typoscript I would prefer to have one COA with both 
headers to get it wrapped at one position with one statement (better 
than splitted wrap with duplicated condition)

instead of
... {
5 = HTML
5.value = <hgroup>
5.if {
	:
}

10 = ... h1-header ...

15 = ... h2-header

16 = HTML
16.value = </hgroup>
16.if {
	:
}
}
I would like to use:
... {
11 = COA
11.10 < .10	// copy existing header into new COA
10 >		// remove existing header

11.20 = ... h2 ...	// define subheader

11.wrap = <hgroup>|</hgroup>
11.wrap.if {		// clean wrap only if ....
	:
}
}

bernd
-- 
http://www.pi-phi.de/cheatsheet.html




More information about the TYPO3-dev mailing list