[TYPO3-english] Generic Markers and Conditions

Orish Shrestha orish.typo3 at gmail.com
Thu Jun 20 18:24:48 CEST 2013


Hi all,

I have created a field called news_citation and other fields called
news_vol, news_issue, news_year. I am trying to use tt_news generic markers
to achive this:

IF citation field is filled replace GENERIC_CITATION marker with whatever
there is in citation field
ELSE generate citation format like news_vol(news_issue);news_year eg.
6(6);2013

I created IF part like:
plugin.tt_news.genericmarkers {
data = news_citation
citation = COA
citation{
     field = generic_news_citation
      wrap = <div class="news-citation">|</div>
      required = 1
  }
}

And I created else part like:

plugin.tt_news.genericmarkers {
data = news_vol, news_issue, generic_news_year
citation = COA
citation{
      13 = TEXT
      13.field = generic_news_vol
    13.wrap = |
    13.required = 1

    14 = TEXT
      14.field = generic_news_issue
    14.wrap = ( | )
    14.required = 1

    15 = TEXT
      15.field = generic_news_year
    15.wrap = ;|
    15.required = 1

  }
}


But I dont know how to use them in IF ELSE Condition OR Override one if
there is another.

Also, in the ELSE part, is there a way I can say, replace citation marker
only if all the fields are present? Meaning, in current set up if you only
have news_vol and year it will display news_vol;news_year eg 6;2013. Is
there a way I can say if any one of the field is missing don't populate the
citation?

Can someone help me?

Thank you very much!

Regards,
Orish


More information about the TYPO3-english mailing list