Hi Søren,

> This won't work though - since my premise is that I change the field from
> type "Typoscript Object Path" (thereby giving me the option to target it with
> lib.readonlinelink) to just a field of the type "Link field" (so users can
> enter this value in page properties). When I do this lib.readonlinelink does
> not exist anymore (or have I completely misunderstood this?)

Ok, I see.
It is still possible, but a bit more tricky.
You could still insert a lib into that field, but the trickiest problem is that you cannot access the TV field in your normal TS template, so you'll have to insert some TS inside the TV DS (data structure).

First, you change the readonlinelink-field into a link field.

Then you open the DS and find the part for this field.
There you add the typoscript part:

                        <TypoScript><![CDATA[
        10 = TEXT
        10.value = {$readonlinelinktext.da}
        10.typolink {
             parameter.data = getIndpEnv:TYPO3_REQUEST_URL
             parameter.override.field = field_readonlinelink
             title = {$readonlinelinktext.da}
        }
                    ]]></TypoScript>


Next, you need to use the trick described here [1] to access your constants inside a TV DS. (It's horendous, sorry) But of course you can also give your editors a sense of flexibility by changing the constant into another TV field. Then you can use field = field_readonlinelinktext

The only thing you have to take care of is that such changes in the DS get lost when you click 'modify DS/TO' (the button for which TV always warns you) and save. But of course you can always find back your changes in history and redo them.

It may have been more elegant if you could do this trick in the normal TS templates, but that doesn't work unless you would find a way around this:

"The scope of the TV fields are kind of tricky, the fields are not available from within your normal TStemplate, actually they are only available from the same level (ie. you can not access fields within a section from a field outside of the section) within the TVDS."

See [2] for more info

Anyway, I hope you get hang of it and get it to work.
Time to go to sleep.

Cheers,
Loek


[1] http://wiki.typo3.org/wiki/TemplaVoila/FCE
[2] http://wiki.typo3.org/wiki/TemplaVoila

_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to