[TYPO3-english] Author marker wrap

Orish Shrestha orish.typo3 at gmail.com
Fri May 6 17:43:14 CEST 2011


It seems I jumped to the conclusion too early here. The TS solves the issue
where there is email but when there is no email, it seems stdWrap also
returns "" and hence there is no wrap at all when the condition is false.

I confirmed this in from the doc which says :

if

->if

If the if-object returns false, stdWrap returns "" immediately

http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/5/1/

Regards,
Orish

On Thu, May 5, 2011 at 2:38 PM, Orish Shrestha <orish.typo3 at gmail.com>wrote:

> Thank you so much Sebastiaan! It did the trick!
>
> Regards,
> Orish
>
> On Thu, May 5, 2011 at 10:01 AM, Sebastiaan de Jonge <
> typo3 at sebastiaandejonge.com> wrote:
>
> > Hi Orish,
> >
> > Yes in that case you could use the if condition on the stdWrap. You would
> > get something like the following:
> >
> > plugin.tt_news.displaySingle.author_stdWrap.wrap = FROM: |
> > plugin.tt_news.displaySingle.author_stdWrap.if.isTrue.field = email
> >
> > See TSref for more details:
> >
> >
> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.4.0/view/1/5/#id2621248
> >
> > Cheers,
> > Sebastiaan
> >
> >
> > On Thu, May 5, 2011 at 3:42 PM, Orish Shrestha <orish.typo3 at gmail.com
> > >wrote:
> >
> > > Thank you Sebastiaan for the reply. I also thought the same but later I
> > > realise that I can use email author field for IF condition ie. all the
> > > author that have FROM has email field filled. Is it possible to use
> this
> > > field in instead of string comparision of the author to detect FROM in
> > it.
> > >
> > > if (AUTHOREMAIL IS NOT SET){
> > > plugin.tt_news.displaySingle {
> > >    author_stdWrap.wrap >
> > >    author_stdWrap.wrap = FROM: |
> > >  }
> > > }
> > >
> > >
> > > Thank you once again!
> > >
> > > Regards,
> > > Orish
> > >
> > > On Thu, May 5, 2011 at 3:53 AM, Sebastiaan de Jonge <
> > > typo3 at sebastiaandejonge.com> wrote:
> > >
> > > > Hi Orish,
> > > >
> > > > I'm afraid that will be impossible without any script intervention.
> > There
> > > > is
> > > > not really anything for this kind of string comparison, so I guess
> you
> > > will
> > > > end up creating a user function or using one of tt_news's hooks.
> > > >
> > > > Cheers,
> > > > Sebastiaan
> > > >
> > > > On Wed, May 4, 2011 at 8:54 PM, Orish Shrestha <
> orish.typo3 at gmail.com
> > > > >wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > I have been trying to achieve this functionality using TS but I
> don't
> > > > know
> > > > > if its doable or not. I know, for tt_news SINGLE VIEW  you can use
> to
> > > > wrap
> > > > > author name using.
> > > > > plugin.tt_news.displaySingle {
> > > > >     author_stdWrap.wrap >
> > > > >     author_stdWrap.wrap = |,&nbsp;(ANYTHING)
> > > > > }
> > > > >
> > > > > This will append ",&nbsp;(ANYTHING)" after author name and this is
> > > > working
> > > > > fine. Now, I am wondering if I can wrap this mechanism with a
> > condition
> > > > > such
> > > > > that if author name contains FROM don't do anything else add FROM
> > > infront
> > > > > of
> > > > > it.
> > > > > ie.
> > > > > if(!AUTHOR HAS "FROM"){
> > > > >
> > > > > plugin.tt_news.displaySingle {
> > > > >     author_stdWrap.wrap >
> > > > >     author_stdWrap.wrap = FROM: |
> > > > > }
> > > > > }
> > > > >
> > > > > Any kind of inputs are heartly welcomed and anticipated !
> > > > >
> > > > > Regards,
> > > > > Orish
> > > > > _______________________________________________
> > > > > TYPO3-english mailing list
> > > > > TYPO3-english at lists.typo3.org
> > > > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> > > > >
> > > > _______________________________________________
> > > > TYPO3-english mailing list
> > > > TYPO3-english at lists.typo3.org
> > > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> > > >
> > > _______________________________________________
> > > TYPO3-english mailing list
> > > TYPO3-english at lists.typo3.org
> > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> > >
> >
> > Kind regards,
> > Sebastiaan de Jonge
> >
> > Freelance TYPO3/PHP developer
> > w: http://sebastiaandejonge.com | e: office at sebastiaandejonge.com |
> skype:
> > sabsebsop
> > _______________________________________________
> > TYPO3-english mailing list
> > TYPO3-english at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> >
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list