[TYPO3-english] userFunc condition
Sergio Catalá Gil
scatala at iti.upv.es
Wed Sep 9 14:39:39 CEST 2009
What I mean, Peter, is: how would I get the return value (true or false)
of a function inside my TS?
I've got the next method:
<?
class user_functions {
function user_compare_dates($content, $conf) {
// Opened course
if
($this->cObj->data['generic_tx_mblnewsevent_inscription_end_date'] >
strtotime(now))
return true;
// Closed course
else
return false;
}
}
?>
and the next TS code:
plugin.tt_news.genericmarkers {
pk = TEXT
pk {
value = <strong>Closed course</strong>
wrap = |</p>
}
}
plugin.tt_news.genericmarkers {
pk = USER
pk {
userFunc = user_functions->user_compare_dates
#################################
# if (return_value_of_userFunc_is_true) then
# 10 = TEXT
# 10.value = <strong>Opened course</strong>
#################################
}
}
I don't know how to solve the code between ### and get the return value
of the function :-(
Sergio
More information about the TYPO3-english
mailing list