Inserito helper taglio testi articolo in categorySummary

Signed-off-by: Riccardo Di Dato <r.didato@asdynamics.it>
This commit is contained in:
Riccardo Di Dato
2017-07-31 15:20:53 +02:00
parent d663326da9
commit 2394f7af55
+9 -3
View File
@@ -67,9 +67,15 @@ try{
// $stringTitolo = (strlen($notizia->titolo) > 103) ? substr($notizia->titolo,0,100).'...' : $notizia->titolo;
// $stringSottotitolo = (strlen($notizia->sottotitolo) > 73) ? substr($notizia->sottotitolo,0,70).'...' : $notizia->sottotitolo;
// $stringTesto = (strlen($notizia->testo) > 33) ? substr($notizia->testo,0,30).'...' : $notizia->testo;
$stringTitolo = (strlen($notizia->titolo) > 103) ? htmlentities( substr( html_entity_decode( $notizia->titolo, ENT_QUOTES|ENT_HTML5 ),0,100) ).'...' : $notizia->titolo;
$stringSottotitolo = (strlen($notizia->sottotitolo) > 73) ? htmlentities( substr( html_entity_decode( $notizia->sottotitolo, ENT_QUOTES|ENT_HTML5 ) ,0,70) ).'...' : $notizia->sottotitolo;
$stringTesto = (strlen($notizia->testo) > 33) ? htmlentities( substr( html_entity_decode( $notizia->testo, ENT_QUOTES|ENT_HTML5 ),0,30) ).'...' : $notizia->testo;
// $stringTitolo = (strlen($notizia->titolo) > 103) ? htmlentities( substr( html_entity_decode( $notizia->titolo, ENT_QUOTES|ENT_HTML5 ),0,100) ).'...' : $notizia->titolo;
// $stringSottotitolo = (strlen($notizia->sottotitolo) > 73) ? htmlentities( substr( html_entity_decode( $notizia->sottotitolo, ENT_QUOTES|ENT_HTML5 ) ,0,70) ).'...' : $notizia->sottotitolo;
// $stringTesto = (strlen($notizia->testo) > 33) ? htmlentities( substr( html_entity_decode( $notizia->testo, ENT_QUOTES|ENT_HTML5 ),0,30) ).'...' : $notizia->testo;
$stringTitolo = $notizia->cutTextHtmlSafe("titolo",100);
$stringSottotitolo = $notizia->cutTextHtmlSafe("sottotitolo",70);
$stringTesto = $notizia->cutTextHtmlSafe("testo",30);
$media = DaoMediaHandler::getMainMediaFromModel($notizia);
?>
<div class="notiziaContainer">