Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] Typoscript in Templavoila within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; hallo everybody I modified an image content element in the XML of DS <TypoScript> 10 = IMAGE 10.file = ...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beitr鋑e | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
hallo everybody
I modified an image content element in the XML of DS <TypoScript> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 10.stdWrap.typolink.section.field = field_relatedlink </TypoScript> this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like: <a href="....index.php?6#aaa">related this is fixed) aaa </a>if "bbb" <a href="....index.php?6#bbb">related: bbb </a> I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila. Thanks very much. __________________________________________________ _______________ 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜! http://im.live.cn/emoticons/?ID=18 _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
Hello,
if you read TS Ref, you will see this : "Now the input can be an alias or page-id. If the input is an integer it's a page-id, if it's two comma separated integers, it's a id/type pair, else it's an alias. For page-id's or aliases you can prepend a "#" mark with a number indication tt_content record number on the page to jump to! (if .section-property is present, it overrides this)." => if .section-property is present, it overrides this means you should code like this : <TypoScript> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink } </TypoScript> not tested, but should work... tell me if it's OK ![]() LinTong a écrit : > hallo everybody > > > I modified an image content element in the XML of DS > > <TypoScript> > 10 = IMAGE > 10.file = fileadmin/templates/img/relatedlink.jpg > 10.stdWrap.typolink.parameter = 6 > 10.stdWrap.typolink.section.field = field_relatedlink > </TypoScript> > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like: > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> if "bbb" > <a href="....index.php?6#bbb">related: bbb </a> > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila. > > Thanks very much. > > __________________________________________________ _______________ > 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜! > http://im.live.cn/emoticons/?ID=18 _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Hallo Chris
Thanks very much for your response.Your code works partly but... at first you can see the source code of XML ********************************************* <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">1</HSC> </proc> <TypoScript> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink } </TypoScript> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink> ************************************************ first problem:It will display as follow: <a href="index.php?id=6#cMYINPUT" >Research Topic</a> it is not a link. that means in source code it looks like <a href="index.php?id=6#c2222" >Research Topics</a> second,the name of the link"Research Topic" is the title of the target page(id = 6). I don't know which part of your code works that way. I would like to display "fixed content"+ MYINPUT. Third, you can see there is a "c" in front of MYINPUT. I don't know how it comes. in a word, the link should be <a href="index.php?id=6#MYINPUT" >"fixed content"+ MYINPUT</a> However, thanks very much for your help. > From: chris (AT) oblady (DOT) com> Date: Fri, 27 Jun 2008 18:05:59 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > Hello,> > if you read TS Ref, you will see this :> > "Now the input can be an alias or page-id. If the input is an integer> it's a page-id, if it's two comma separated integers, it's a id/type> pair, else it's an alias. For page-id's or aliases you can prepend a "#"> mark with a number indication tt_content record number on the page to> jump to! (if .section-property is present, it overrides this)."> > => if .section-property is present, it overrides this> > means you should code like this :> > <TypoScript>> 10 = IMAGE> 10.file = fileadmin/templates/img/relatedlink.jpg> 10.stdWrap.typolink.parameter = 6> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> 10.stdWrap.typolink.parameter.stdWrap.append {> wrap=#|> field=field_relatedlink> }> </TypoScript>> > not tested, but should work...> > tell me if it's OK > > LinTong a écrit :> > hallo everybody> > > > > > I modified an image content element in the XML of DS> > > > <TypoScript>> > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > 10.stdWrap.typolink.section.field = field_relatedlink> > </TypoScript>> > > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like:> > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> > if "bbb"> > <a href="....index.php?6#bbb">related: bbb </a>> > > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila.> > > > Thanks very much.> > > > __________________________________________________ _______________> > 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!> > http://im.live.cn/emoticons/?ID=18> _______________________________________________> TYPO3-english mailing list> TYPO3-english (AT) lists (DOT) netfielders.de> http://lists.netfielders.de/cgi-bin/.../typo3-english__________________________________________________ _______________ 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! http://mobile.msn.com.cn/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
Hello,
first, I didn't notice : <HSC type="integer">1</HSC> means your content is passed through htmlspecialchars... => just delete this line or set it to 0 for your link text, by default the typolink does this : typolink.stdWrap.field=title (the linked page title) => you still can use stdWrap over this to do what you need... LinTong a écrit : > Hallo Chris > > Thanks very much for your response.Your code works partly but... at first you can see the source code of XML > ********************************************* > <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">1</HSC> </proc> <TypoScript> > 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 > 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink } > > </TypoScript> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink> > > ************************************************ > first problem:It will display as follow: > > <a href="index.php?id=6#cMYINPUT" >Research Topic</a> > > it is not a link. that means in source code it looks like > <a href="index.php?id=6#c2222" >Research Topics</a> > > second,the name of the link"Research Topic" is the title of the target page(id = 6). I don't know which part of your code works that way. I would like to display "fixed content"+ MYINPUT. > > Third, you can see there is a "c" in front of MYINPUT. I don't know how it comes. > > in a word, the link should be <a href="index.php?id=6#MYINPUT" >"fixed content"+ MYINPUT</a> > > However, thanks very much for your help. > > > > >> From: chris (AT) oblady (DOT) com> Date: Fri, 27 Jun 2008 18:05:59 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > Hello,> > if you read TS Ref, you will see this :> > "Now the input can be an alias or page-id. If the input is an integer> it's a page-id, if it's two comma separated integers, it's a id/type> pair, else it's an alias. For page-id's or aliases you can prepend a "#"> mark with a number indication tt_content record number on the page to> jump to! (if .section-property is present, it overrides this)."> > => if .section-property is present, it overrides this> > means you should code like this :> > <TypoScript>> 10 = IMAGE> 10.file = fileadmin/templates/img/relatedlink.jpg> 10.stdWrap.typolink.parameter = 6> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> 10.stdWrap.typolink.parameter.stdWrap.append {> wrap=#|> field=field_relatedlink> }> </TypoScript>> > not tested, but should work...> > tell me if it's OK > > LinTong a écrit :> > hallo everybody> > > > > > I modified an image content element in the XML of DS> > > > <TypoScript>> > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > 10.stdWrap.typolink.section.field = field_relatedlink> > </TypoScript>> > > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like:> > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> > if "bbb"> > <a href="....index.php?6#bbb">related: bbb </a>> > > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila.> > > > Thanks very much.> > > > __________________________________________________ _______________> > 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!> > http://im.live.cn/emoticons/?ID=18> _______________________________________________> TYPO3-english mailing list> TYPO3-english (AT) lists (DOT) netfielders.de> http://lists.netfielders.de/cgi-bin/.../typo3-english > __________________________________________________ _______________ > 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! > http://mobile.msn.com.cn/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#5
|
|||
|
|||
|
Hallo Chris
Thanks very much for you response I am sorry that i am a newbie for tsref. and i tried to override the target, but... ----------------------------------------------------------------------- <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">0</HSC> </proc> <TypoScript> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 *************************************** 10.stdWrap.typolink.target.field = field_relatedlink *************************************** 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink } </TypoScript> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink> --------------------------------------------------------- But it does not work. the name of the link is still the title of the target page. Second, the link looks like <a href="...index.php?id=6#cMYINPUT">....</a>. I don't know why there is a character "c" Thanks very much for your help > From: chris (AT) oblady (DOT) com > Date: Sun, 29 Jun 2008 11:38:05 +0200 > To: typo3-english (AT) lists (DOT) netfielders.de > Subject: Re: [TYPO3] Typoscript in Templavoila > > Hello, > > first, I didn't notice : > <HSC type="integer">1</HSC> > means your content is passed through htmlspecialchars... > => just delete this line or set it to 0 > > > for your link text, by default the typolink does this : > typolink.stdWrap.field=title (the linked page title) > => you still can use stdWrap over this to do what you need... > > > LinTong a écrit : > > Hallo Chris > > > > Thanks very much for your response.Your code works partly but... at first you can see the source code of XML > > ********************************************* > > <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">1</HSC> </proc> <TypoScript> > > 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 > > 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink } > > > > </TypoScript> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink> > > > > ************************************************ > > first problem:It will display as follow: > > > > <a href="index.php?id=6#cMYINPUT" >Research Topic</a> > > > > it is not a link. that means in source code it looks like > > <a href="index.php?id=6#c2222" >Research Topics</a> > > > > second,the name of the link"Research Topic" is the title of the target page(id = 6). I don't know which part of your code works that way. I would like to display "fixed content"+ MYINPUT. > > > > Third, you can see there is a "c" in front of MYINPUT. I don't know how it comes. > > > > in a word, the link should be <a href="index.php?id=6#MYINPUT" >"fixed content"+ MYINPUT</a> > > > > However, thanks very much for your help. > > > > > > > > > >> From: chris (AT) oblady (DOT) com> Date: Fri, 27 Jun 2008 18:05:59 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > Hello,> > if you read TS Ref, you will see this :> > "Now the input can be an alias or page-id. If the input is an integer> it's a page-id, if it's two comma separated integers, it's a id/type> pair, else it's an alias. For page-id's or aliases you can prepend a "#"> mark with a number indication tt_content record number on the page to> jump to! (if .section-property is present, it overrides this)."> > => if .section-property is present, it overrides this> > means you should code like this :> > <TypoScript>> 10 = IMAGE> 10.file = fileadmin/templates/img/relatedlink.jpg> 10.stdWrap.typolink.parameter = 6> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> 10.stdWrap.typolink.parameter.stdWrap.append {> wrap=#|> field=field_relatedlink> }> </TypoScript>> > not tested, but should work...> > tell me if it's OK > > LinTong > a écrit :> > hallo everybody> > > > > > I modified an image content element in the XML of DS> > > > <TypoScript>> > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > 10.stdWrap.typolink.section.field = field_relatedlink> > </TypoScript>> > > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like:> > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> > if "bbb"> > <a href="....index.php?6#bbb">related: bbb </a>> > > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila.> > > > Thanks very much.> > > > __________________________________________________ _______________> > 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!> > http://im.live> .cn/emoticons/?ID=18> _______________________________________________> TYPO3-english mailing list> TYPO3-english (AT) lists (DOT) netfielders.de> http://lists.netfielders.de/cgi-bin/.../typo3-english > > __________________________________________________ _______________ > > 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! > > http://mobile.msn.com.cn/ > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english __________________________________________________ _______________ 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! http://mobile.msn.com.cn/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#6
|
|||
|
|||
|
OK, I think i've got it
![]() let me explain : when the typolink function receives the "page id + # + anchor number" it expects a content id which is always prefixed by "c" (w3c compliance : an id can't begin with a number). There is another solution which is to make the link differently, like this : 10=COA 10.1=TEXT 10.1 { typolink.parameter=6 typolink.returnLast=url wrap=<a href="| } # 10.1 generates : <a href="index.php?id=6 10.2=TEXT 10.2 { field=field_relatedlink wrap=#|"> } # 10.2 generates #MYINPUT and ends opening a tag 10.3 = IMAGE 10.3.file = fileadmin/templates/img/relatedlink.jpg # 10.3 : your image 10.4=TEXT 10.4.value=</a> # 10.4 closes a tag .... should work this time ! Further, to prevent errors if the users don't fill some fields in your FCE, you should read the "if" documentation in TSRef... that will help ![]() LinTong a 茅crit : > Hallo Chris > > Thanks very much for you response > I am sorry that i am a newbie for tsref. and i tried to override the target, but... > ----------------------------------------------------------------------- > <field_relatedlink type="array"> > <tx_templavoila type="array"> > <title>related topics</title> > <description>related topics</description> > <sample_data type="array"> > <numIndex index="0">related topics</numIndex> > </sample_data> > <eType>input</eType> > <proc type="array"> > <HSC type="integer">0</HSC> > </proc> > <TypoScript> > > 10 = IMAGE > 10.file = fileadmin/templates/img/relatedlink.jpg > 10.stdWrap.typolink.parameter = 6 > *************************************** > 10.stdWrap.typolink.target.field = field_relatedlink > *************************************** > 10.stdWrap.typolink.parameter.stdWrap.append=TEXT > 10.stdWrap.typolink.parameter.stdWrap.append { > wrap=#| > field=field_relatedlink > } > > </TypoScript> > </tx_templavoila> > <TCEforms type="array"> > <config type="array"> > <type>input</type> > <size>1</size> > <eval>trim</eval> > </config> > <label>related topics</label> > </TCEforms> > </field_relatedlink> > --------------------------------------------------------- > But it does not work. the name of the link is still the title of the target page. > > Second, the link looks like <a href="...index.php?id=6#cMYINPUT">....</a>. I don't know why there is a character "c" > > Thanks very much for your help > > > >> From: chris (AT) oblady (DOT) com >> Date: Sun, 29 Jun 2008 11:38:05 +0200 >> To: typo3-english (AT) lists (DOT) netfielders.de >> Subject: Re: [TYPO3] Typoscript in Templavoila >> >> Hello, >> >> first, I didn't notice : >> <HSC type="integer">1</HSC> >> means your content is passed through htmlspecialchars... >> => just delete this line or set it to 0 >> >> >> for your link text, by default the typolink does this : >> typolink.stdWrap.field=title (the linked page title) >> => you still can use stdWrap over this to do what you need... >> >> >> LinTong a 茅crit : >>> Hallo Chris >>> >>> Thanks very much for your response.Your code works partly but... at first you can see the source code of XML >>> ********************************************* >>> <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">1</HSC> </proc> <TypoScript> >>> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6 >>> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink } >>> >>> </TypoScript> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink> >>> >>> ************************************************ >>> first problem:It will display as follow: >>> >>> <a href="index.php?id=6#cMYINPUT" >Research Topic</a> >>> >>> it is not a link. that means in source code it looks like >>> <a href="index.php?id=6#c2222" >Research Topics</a> >>> >>> second,the name of the link"Research Topic" is the title of the target page(id = 6). I don't know which part of your code works that way. I would like to display "fixed content"+ MYINPUT. >>> >>> Third, you can see there is a "c" in front of MYINPUT. I don't know how it comes. >>> >>> in a word, the link should be <a href="index.php?id=6#MYINPUT" >"fixed content"+ MYINPUT</a> >>> >>> However, thanks very much for your help. >>> >>> >>> >>> >>>> From: chris (AT) oblady (DOT) com> Date: Fri, 27 Jun 2008 18:05:59 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > Hello,> > if you read TS Ref, you will see this :> > "Now the input can be an alias or page-id. If the input is an integer> it's a page-id, if it's two comma separated integers, it's a id/type> pair, else it's an alias. For page-id's or aliases you can prepend a "#"> mark with a number indication tt_content record number on the page to> jump to! (if .section-property is present, it overrides this)."> > => if .section-property is present, it overrides this> > means you should code like this :> > <TypoScript>> 10 = IMAGE> 10.file = fileadmin/templates/img/relatedlink.jpg> 10.stdWrap.typolink.parameter = 6> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> 10.stdWrap.typolink.parameter.stdWrap.append {> wrap=#|> field=field_relatedlink> }> </TypoScript>> > not tested, but should work...> > tell me if it's OK > > LinTong >> a 茅crit :> > hallo everybody> > > > > > I modified an image content element in the XML of DS> > > > <TypoScript>> > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > 10.stdWrap.typolink.section.field = field_relatedlink> > </TypoScript>> > > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like:> > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> > if "bbb"> > <a href="....index.php?6#bbb">related: bbb </a>> > > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila.> > > > Thanks very much.> > > > __________________________________________________ _______________> > 鏂板勾鎹㈡柊棰滐紝蹇潵濡嗘壆鑷繁鐨凪SN缁欏績浠 殑TA涓涓儕鍠滐紒> > http://im.live >> .cn/emoticons/?ID=18> _______________________________________________> TYPO3-english mailing list> TYPO3-english (AT) lists (DOT) netfielders.de> http://lists.netfielders.de/cgi-bin/.../typo3-english >>> __________________________________________________ _______________ >>> 鐢ㄦ墜鏈篗SN鑱婂ぉ鍐欓偖浠剁湅绌洪棿锛屾*闄愭矡閫 氾紝鍒嗕韩绮惧僵锛 >>> http://mobile.msn.com.cn/ >> _______________________________________________ >> TYPO3-english mailing list >> TYPO3-english (AT) lists (DOT) netfielders.de >> http://lists.netfielders.de/cgi-bin/.../typo3-english > > __________________________________________________ _______________ > 鐢ㄦ墜鏈篗SN鑱婂ぉ鍐欓偖浠剁湅绌洪棿锛屾*闄愭矡閫 氾紝鍒嗕韩绮惧僵锛 > http://mobile.msn.com.cn/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#7
|
|||
|
|||
|
Hallo Chris
Thanks very much. The first solution you told me works fine. Could you help me to improve this function? I have modified the typoscript as follow********************* 10 = TEXT 10.field = field_topictitle 10.stdWrap.typolink.parameter = 6 10.stdWrap.typolink.target.field = field_relatedlink 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink}******************what i would like to do is thatinput : Aliceoutput: <a href="...index.php?id=6#A">Alice</a>. input : boyoutput: <a href="...index.php?id=6#b">boy</a>. That means the first letter of the input is as an anchor. I tried to use Split function but...I read the TSref carefully but i don't quite understand. Could you recommend some references about tsref which include a lot of examples?Thanks very much. > From: chris (AT) oblady (DOT) com> Date: Tue, 1 Jul 2008 15:06:23 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > OK, I think i've got it > > let me explain : when the typolink function receives the "page id + # + > anchor number" it expects a content id which is always prefixed by "c" > (w3c compliance : an id can't begin with a number).> > There is another solution which is to make the link differently, like this :> > 10=COA> > 10.1=TEXT> 10.1 {> typolink.parameter=6> typolink.returnLast=url> wrap=<a href="|> }> # 10.1 generates : <a href="index.php?id=6> > 10.2=TEXT> 10.2 {> field=field_relatedlink> wrap=#|">> }> # 10.2 generates #MYINPUT and ends opening a tag> > 10.3 = IMAGE> 10.3.file = fileadmin/templates/img/relatedlink.jpg> # 10.3 : your image> > 10.4=TEXT> 10.4.value=</a>> # 10.4 closes a tag> > ... should work this time !> > Further, to prevent errors if the users don't fill some fields in your > FCE, you should read the "if" documentation in TSRef... that will help> > > > LinTong a 茅crit :> > Hallo Chris> > > > Thanks very much for you response> > I am sorry that i am a newbie for tsref. and i tried to override the target, but...> > -----------------------------------------------------------------------> > <field_relatedlink type="array">> > <tx_templavoila type="array">> > <title>related topics</title>> > <description>related topics</description>> > <sample_data type="array">> > <numIndex index="0">related topics</numIndex>> > </sample_data>> > <eType>input</eType>> > <proc type="array">> > <HSC type="integer">0</HSC>> > </proc>> > <TypoScript>> > > > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > ***************************************> > 10.stdWrap.typolink.target.field = field_relatedlink> > ***************************************> > 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> > 10.stdWrap.typolink.parameter.stdWrap.append {> > wrap=#|> > field=field_relatedlink> > }> > > > </TypoScript>> > </tx_templavoila>> > <TCEforms type="array">> > <config type="array">> > <type>input</type>> > <size>1</size>> > <eval>trim</eval>> > </config>> > <label>related topics</label>> > </TCEforms>> > </field_relatedlink>> > ---------------------------------------------------------> > But it does not work. the name of the link is still the title of the target page.> > > > Second, the link looks like <a href="...index.php?id=6#cMYINPUT">....</a>. I don't know why there is a character "c"> > > > Thanks very much for your help> > > > > > > >> From: chris (AT) oblady (DOT) com> >> Date: Sun, 29 Jun 2008 11:38:05 +0200> >> To: typo3-english (AT) lists (DOT) netfielders.de> >> Subject: Re: [TYPO3] Typoscript in Templavoila> >>> >> Hello,> >>> >> first, I didn't notice :> >> <HSC type="integer">1</HSC>> >> means your content is passed through htmlspecialchars...> >> => just delete this line or set it to 0> >>> >>> >> for your link text, by default the typolink does this :> >> typolink.stdWrap.field=title (the linked page title)> >> => you still can use stdWrap over this to do what you need...> >>> >>> >> LinTong a 茅crit :> >>> Hallo Chris> >>> > >>> Thanks very much for your response.Your code works partly but... at first you can see the source code of XML> >>> *********************************************> >>> <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">1</HSC> </proc> <TypoScript>> >>> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6> >>> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink }> >>> > >>> </TypoScript> </tx_templavoila> <TCEforms type="array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink>> >>> > >>> ************************************************> >>> first problem:It will display as follow:> >>> > >>> <a href="index.php?id=6#cMYINPUT" >Research Topic</a> > >>> > >>> it is not a link. that means in source code it looks like> >>> <a href="index.php?id=6#c2222" >Research Topics</a>> >>> > >>> second,the name of the link"Research Topic" is the title of the target page(id = 6). I don't know which part of your code works that way. I would like to display "fixed content"+ MYINPUT.> >>> > >>> Third, you can see there is a "c" in front of MYINPUT. I don't know how it comes.> >>> > >>> in a word, the link should be <a href="index.php?id=6#MYINPUT" >"fixed content"+ MYINPUT</a> > >>> > >>> However, thanks very much for your help.> >>> > >>> > >>> > >>> > >>>> From: chris (AT) oblady (DOT) com> Date: Fri, 27 Jun 2008 18:05:59 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > Hello,> > if you read TS Ref, you will see this :> > "Now the input can be an alias or page-id. If the input is an integer> it's a page-id, if it's two comma separated integers, it's a id/type> pair, else it's an alias. For page-id's or aliases you can prepend a "#"> mark with a number indication tt_content record number on the page to> jump to! (if .section-property is present, it overrides this)."> > => if .section-property is present, it overrides this> > means you should code like this :> > <TypoScript>> 10 = IMAGE> 10.file = fileadmin/templates/img/relatedlink.jpg> 10.stdWrap.typolink.parameter = 6> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> 10.stdWrap.typolink.parameter.stdWrap.append {> wrap=#|> field=field_relatedlink> }> </TypoScript>> > not tested, but should work...> > tell me if it's OK > > LinTon> g > >> a 茅crit :> > hallo everybody> > > > > > I modified an image content element in the XML of DS> > > > <TypoScript>> > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > 10.stdWrap.typolink.section.field = field_relatedlink> > </TypoScript>> > > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like:> > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> > if "bbb"> > <a href="....index.php?6#bbb">related: bbb </a>> > > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila.> > > > Thanks very much.> > > > __________________________________________________ _______________> > 鏂板勾鎹㈡柊棰滐紝蹇潵濡嗘壆鑷繁鐨凪SN缁欏績浠 殑TA涓涓拷> 锟斤拷鍠滐紒> > http://im.live> >> .cn/emoticons/?ID=18> _______________________________________________> TYPO3-english mailing list> TYPO3-english (AT) lists (DOT) netfielders.de> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english> >>> __________________________________________________ _______________> >>> 鐢ㄦ墜鏈篗SN鑱婂ぉ鍐欓偖浠剁湅绌洪棿锛屾*闄愭矡閫 氾紝鍒嗕韩绮惧僵锛> >>> http://mobile.msn.com.cn/> >> _______________________________________________> >> TYPO3-english mailing list> >> TYPO3-english (AT) lists (DOT) netfielders.de> >> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english> > > > __________________________________________________ _______________> > 鐢ㄦ墜鏈篗SN鑱婂ぉ鍐欓偖浠剁湅绌洪棿锛屾*闄愭矡閫 氾紝鍒嗕韩绮惧僵锛> > http://mobile.msn.com.cn/__________________________________________________ _______________ Windows Live Photo gallery 鏁扮*佺浉鏈虹殑瓒呯骇浼翠荆锛岃交鏉剧鐞嗗拰缂栬 戠収鐗囷紝杩樿兘鍒朵綔鍏ㄦ櫙缇庡浘锛 http://get.live.cn/product/photo.html _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#8
|
|||
|
|||
|
Hello again,
- first, there is one thing that you should delete from your piece of code, this line : 10.stdWrap.typolink.target.field = field_relatedlink I don't think this line generates anything useful ?? - About the "split" function, it is not the one you need : this function expects a "separator" character, to split a string into multiple parts. - For your needs, "crop" (stdWrap.crop) will do : http://typo3.org/documentation/docum....1.0/view/5/1/ 10 = TEXT 10.field = field_topictitle 10.stdWrap.typolink.parameter = 6 10.stdWrap.typolink.target.field = field_relatedlink 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { field=field_relatedlink crop= 1| wrap=#| } About documentation or examples, this work is on the way : http://news.typo3.org/news/article/t...in-45-minutes/ (not finished, only German, but I guess this will be a must) http://support.typo3.org/snippets/ All new, will grow fast http://typo3.org/documentation/docum...x/0.0.16/view/ Anyway, you will find lots of examples by Googling, but keep in mind that the best is to understand how things work, I myself found lots of examples with errors, and most of the time with no explanation ![]() LinTong a 茅crit : > Hallo Chris > > Thanks very much. The first solution you told me works fine. > Could you help me to improve this function? I have modified the typoscript as follow********************* 10 = TEXT 10.field = field_topictitle 10.stdWrap.typolink.parameter = 6 10.stdWrap.typolink.target.field = field_relatedlink 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink}******************what i would like to do is thatinput : Aliceoutput: <a href="...index.php?id=6#A">Alice</a>. > input : boyoutput: <a href="...index.php?id=6#b">boy</a>. > That means the first letter of the input is as an anchor. I tried to use Split function but...I read the TSref carefully but i don't quite understand. > Could you recommend some references about tsref which include a lot of examples?Thanks very much. > > > >> From: chris (AT) oblady (DOT) com> Date: Tue, 1 Jul 2008 15:06:23 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > OK, I think i've got it > > let me explain : when the typolink function receives the "page id + # + > anchor number" it expects a content id which is always prefixed by "c" > (w3c compliance : an id can't begin with a number).> > There is another solution which is to make the link differently, like this :> > 10=COA> > 10.1=TEXT> 10.1 {> typolink.parameter=6> typolink.returnLast=url> wrap=<a href="|> }> # 10.1 generates : <a href="index.php?id=6> > 10.2=TEXT> 10.2 {> field=field_relatedlink> wrap=#|">> }> # 10.2 generates #MYINPUT and ends opening a tag> > 10.3 = IMAGE> 10.3.file = fileadmin/templates/img/relatedlink.jpg> # 10.3 : your image> > 10.4=TEXT> 10.4.value=</a>> # 10.4 closes a tag> > ... should work this time !> > Further, to prevent errors if the users don't fill some fields in your > FCE, you should read the"if" documentation in TSRef... that will help> > > > LinTong a 茅crit :> > Hallo Chris> > > > Thanks very much for you response> > I am sorry that i am a newbie for tsref. and i tried to override the target, but...> > -----------------------------------------------------------------------> > <field_relatedlink type="array">> > <tx_templavoila type="array">> > <title>related topics</title>> > <description>related topics</description>> > <sample_data type="array">> > <numIndex index="0">related topics</numIndex>> > </sample_data>> > <eType>input</eType>> > <proc type="array">> > <HSC type="integer">0</HSC>> > </proc>> > <TypoScript>> > > > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > ***************************************> > 10.stdWrap.typolink.target.field = field_relatedlink> > ***************************************> > 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> > 10.stdWrap.typolink.parameter.stdWrap.append {> > wrap=#|> > field=field_relatedlink> > }> > > > </TypoScript>> > </tx_templavoila>> > <TCEforms type="array">> > <config type="array">> > <type>input</type>> > <size>1</size>> > <eval>trim</eval>> > </config>> > <label>related topics</label>> > </TCEforms>> > </field_relatedlink>> > ---------------------------------------------------------> > But it does not work. the name of the link is still the title of the target page.> > > > Second, the link looks like <a href="...index.php?id=6#cMYINPUT">....</a>. I don't know why there is a character "c"> > > > Thanks very much for your help> > > > > > > >> From: chris (AT) oblady (DOT) com> >> Date: Sun, 29 Jun 2008 11:38:05 +0200> >> To: typo3-english (AT) lists (DOT) netfielders.de> >> Subject: Re: [TYPO3] Typoscript in Templavoila> >>> >> Hello,> >>> >> first, I didn't notice :> >> <HSC type="integer">1</HSC>> >> means your content is passed through htmlspecialchars...> >> => just delete this line or set it to 0> >>> >>> >> for your link text, b y default the typolink does this :> >> typolink.stdWrap.field=title (the linked page title)> >> => you still can use stdWrap over this to do what you need...> >>> >>> >> LinTong a 茅crit :> >>> Hallo Chris> >>> > >>> Thanks very much for your response.Your code works partly but... at first you can see the source code of XML> >>> *********************************************> >>> <field_relatedlink type="array"> <tx_templavoila type="array"> <title>related topics</title> <description>related topics</description> <sample_data type="array"> <numIndex index="0">related topics</numIndex> </sample_data> <eType>input</eType> <proc type="array"> <HSC type="integer">1</HSC> </proc> <TypoScript>> >>> 10 = IMAGE 10.file = fileadmin/templates/img/relatedlink.jpg 10.stdWrap.typolink.parameter = 6> >>> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT 10.stdWrap.typolink.parameter.stdWrap.append { wrap=#| field=field_relatedlink }> >>> > >>> </TypoScript> </tx_templavoila> <TCEforms type=" array"> <config type="array"> <type>input</type> <size>1</size> <eval>trim</eval> </config> <label>related topics</label> </TCEforms> </field_relatedlink>> >>> > >>> ************************************************> >>> first problem:It will display as follow:> >>> > >>> <a href="index.php?id=6#cMYINPUT" >Research Topic</a> > >>> > >>> it is not a link. that means in source code it looks like> >>> <a href="index.php?id=6#c2222" >Research Topics</a>> >>> > >>> second,the name of the link"Research Topic" is the title of the target page(id = 6). I don't know which part of your code works that way. I would like to display "fixed content"+ MYINPUT.> >>> > >>> Third, you can see there is a "c" in front of MYINPUT. I don't know how it comes.> >>> > >>> in a word, the link should be <a href="index.php?id=6#MYINPUT" >"fixed content"+ MYINPUT</a> > >>> > >>> However, thanks very much for your help.> >>> > >>> > >>> > >>> > >>>> From: chris (AT) oblady (DOT) com> Date: Fri, 2 7 Jun 2008 18:05:59 +0200> To: typo3-english (AT) lists (DOT) netfielders.de> Subject: Re: [TYPO3] Typoscript in Templavoila> > Hello,> > if you read TS Ref, you will see this :> > "Now the input can be an alias or page-id. If the input is an integer> it's a page-id, if it's two comma separated integers, it's a id/type> pair, else it's an alias. For page-id's or aliases you can prepend a "#"> mark with a number indication tt_content record number on the page to> jump to! (if .section-property is present, it overrides this)."> > => if .section-property is present, it overrides this> > means you should code like this :> > <TypoScript>> 10 = IMAGE> 10.file = fileadmin/templates/img/relatedlink.jpg> 10.stdWrap.typolink.parameter = 6> 10.stdWrap.typolink.parameter.stdWrap.append=TEXT> 10.stdWrap.typolink.parameter.stdWrap.append {> wrap=#|> field=field_relatedlink> }> </TypoScript>> > not tested, but should work...> > tell me if it's OK > > LinTon> g > >> a 茅crit :> > hallo everybody> > > > > > I modified an image content element in the XML of DS> > > > <TypoScript>> > 10 = IMAGE> > 10.file = fileadmin/templates/img/relatedlink.jpg> > 10.stdWrap.typolink.parameter = 6> > 10.stdWrap.typolink.section.field = field_relatedlink> > </TypoScript>> > > > this add a link "index.php?6#"+the input of field_relatedlink to the image "relatedlink.jpg". it works fine. > > > > but If i want to have a plain input field. e.g. if i input "aaaa", the output will look like:> > <a href="....index.php?6#aaa">related this is fixed) aaa </a>> > if "bbb"> > <a href="....index.php?6#bbb">related: bbb </a>> > > > I tried to write codes similar to the above codes but it does not work. Who could do me a favor to show me the correct typoscript which can be add into the XML of templavoila.> > > > Thanks very much.> > > > __________________________________________________ _______________> > 鏂板勾鎹㈡柊棰滐紝蹇潵濡嗘壆鑷繁鐨凪SN缁欏績浠 殑TA涓涓拷> 锟斤拷鍠滐紒> > http://im.live> >> .cn/emoticons/?ID=18> _______________________________________________> TYPO3-english mailing list> TYPO3-english (AT) lists (DOT) netfielders.de> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english> >>> __________________________________________________ _______________> >>> 鐢ㄦ墜鏈篗SN鑱婂ぉ鍐欓偖浠剁湅绌洪棿锛屾*闄愭矡閫 氾紝鍒嗕韩绮惧僵锛> >>> http://mobile.msn.com.cn/> >> _______________________________________________> >> TYPO3-english mailing list> >> TYPO3-english (AT) lists (DOT) netfielders.de> >> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english> > > > __________________________________________________ _______________> > 鐢ㄦ墜鏈篗SN鑱婂ぉ鍐欓偖浠剁湅绌洪棿锛屾*闄愭矡閫 氾紝鍒嗕韩绮惧僵锛> > http://mobile.msn.com.cn/ > __________________________________________________ _______________ > Windows Live Photo gallery 鏁扮*佺浉鏈虹殑瓒呯骇浼翠荆锛岃交鏉剧鐞嗗拰缂栬 戠収鐗囷紝杩樿兘鍒朵綔鍏ㄦ櫙缇庡浘锛 > http://get.live.cn/product/photo.html _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |