[Typo3-dev] HMENU: don't open mailto-links in new pages
tapio
tapio.markula at dnainternet.net
Thu Jun 30 16:38:13 CEST 2005
JoH wrote:
>>>>NO {
>>>> stdWrap.cObject = CASE
>>>> stdWrap.cObject {
>>>> key.field = doktype
>>>> default = TEXT
>>>> default {
>>>> field = title
>>>> wrap = blah
>>>> }
>>>> 1 = TEXT
>>>> 1 {
>>>> field = title
>>>> wrap = blubb
>>>> }
>>>> }
>>>>}
>>>>
>>>>optionSplit will work for the _whole_ CASE object, so I don't see
>>>>why it should be necessary to have additional confusion by adding
>>>>at least 12 new
>>>>itemstates.
>>>
>>>
>>>Well seems to work also in sub-levels IF you define ALSO 'IFSUB'!
>>>
>>>If yuo define ONLY 'NO' and the page has sub-pages,
>>>sub-pages will not be rendered at all!
>>
>>BUT it still has problems!
>>If you want for docktype '3' that it woudl have
>>different linkWrap and allWrap + doNotShowLink=1,
>>that doesn't work - for 'stdWrap.cObject = CASE' you can define
>>just 'wrap'
>
>
> You can define almost anything with stdWrap.
> I you dont want to show a link:
>
> 3 = TEXT
> 3 {
> value =
> wrap = blubb
> }
>
> if you want something before and/or after the link and still no link
>
>
> 3 = TEXT
> 3 {
> prepend = TEXT
> prepend {
> value = this is before
> wrap = poop
> }
> value =
>
> append = TEXT
> append {
> value = this is before
> wrap = whatever
> }
> }
>
> another approach for the same problem but with link + wrap around
> everything:
>
> 3 = COA
> 3 {
> stdWrap.outerWrap = <div class="doktype3">|</div>
> 10 = TEXT
> 10 {
> value = this is before
> wrap = poop
> }
> 20 = TEXT
> 20 {
> field = title
> wrap = blubb
> }
> 30 = TEXT
> 30 {
> value = this is before
> wrap = whatever
> }
> }
>
>
>>stdWrap.cObject = CASE works TOO LIMITED!
>
>
> As usual the "limit" is just in front of the screen ;-)
Well stdWrap seems to have in most situations enough
possibilities - endeed using lists might be problematic?
For links you can define termination for link and child
to get nested elements work properly.
In my sitemap this works:
NO {
#allWrap = <div class="csc-sitemap csc-sitemap-level2"> | </div>
#linkWrap = <span> • |</span>
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = COA
default {
field = title
stdWrap.outerWrap = <div class="csc-sitemap
csc-sitemap-level2"> | </div>
stdWrap.innerWrap = <span> • |</span>
10 = TEXT
10 {
value =
field=title
wrap = |
}
}
3 = TEXT
4 = TEXT
}
}
IFSUB < .NO
here stdWrap.outerWrap and stdWrap.innerWrap
does the same as allWrap and linkWrap.
BUT if I would have used list elements there might be a problem?
(I just know)
That do the same as
EXTURL=1
EXTURL.linkWrap = |
EXTURL.ATagBeforeWrap = 0
EXTURL.allWrap = |
EXTURL.doNotShowLink=1
EXTURL.doNotLinkIt = 1
SHORTCUT < .EXTURL
Because I didn't get CASE to work as expected
I added EXTURL and SHORTCUT to class.tslib_menu.php
(the first trial failed because of I missed something).
You are right that using the CASE-statement can solve
most situations - but maybe not all?
More information about the TYPO3-dev
mailing list