[TYPO3-english] generic markers question/issue

Douglas La Farge doug at gcnpublishing.com
Thu Mar 18 19:46:57 CET 2010


I've extended tt_news to include some additional data that will be included with each record. I'm using generic markers to pull the data into the single view.

my typoscript setup is as follows.

genericmarkers {
data = tx_ttnewsextender_vitals_article_source, tx_ttnewsextender_vitals_article_source_url 

source = COA
source{
 30 = TEXT
 30.field = generic_tx_ttnewsextender_vitals_article_source_url
 30.wrap = <hr><span class="small_caps"><a href="|">
 30.required = 1

 31 = TEXT
 31.field = generic_tx_ttnewsextender_vitals_article_source
 31.wrap = |</a></span><hr>
 31.required = 1
}
}

The above works perfectly so long as I have both fields (or neither of the fields) populated.

However, it is possible that a URL will not be populated for the record while the source is populated. This will cause the output to be "busted" (no initial <hr> or <span>).

So I need to figure way to work a conditional into this set up.  

IF tx_ttnewsextender_vitals_article_source, tx_ttnewsextender_vitals_article_source_url are populated:

 30 = TEXT
 30.field = generic_tx_ttnewsextender_vitals_article_source_url
 30.wrap = <hr><span class="small_caps"><a href="|">
 30.required = 1

 31 = TEXT
 31.field = generic_tx_ttnewsextender_vitals_article_source
 31.wrap = |</a></span><hr>
 31.required = 1

if only tx_ttnewsextender_vitals_article_source is populated:

 31 = TEXT
 31.field = generic_tx_ttnewsextender_vitals_article_source
 31.wrap = <hr><span class="small_caps">|</span><hr>
 31.required = 1


if neither are populated output nothing (this part currently works).

ideas anyone?

thanks,
doug


More information about the TYPO3-english mailing list