[TYPO3-UG Italy] Risolto: Grazie Mauro la tua soluzione ha funzionato.

esetti at interfree.it esetti at interfree.it
Wed Oct 5 17:11:19 CEST 2011


Se fosse possibile disporre di un soluzione che consenta di scegliere 
AUTOMATICAMENTE l'ultima news (invece di impostarla a mano), sarebbe molto 
comodo.

Il codice riportato nel manuale tt_news non sono riuscito a farlo 
funzionare.

# hide the "no news id" message
plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg =  
# set the tt_news singlePid to the current page
plugin.tt_news.singlePid = 977
# fill the content of the main-column to a tmp.object
tmp.pagecontent < page.10.subparts.contentarea
# clear the content of the main column
page.10.subparts.contentarea >
# build a new object for this column as content-object-array
page.10.subparts.contentarea = COA
page.10.subparts.contentarea {
    10 = CONTENT
    10.table = tt_news
    10.select {
        # insert the pids of all pages from where you want to fetch news.
        # the recursive-field has no influence on this selection
        pidInList = 1078,1079,1080,1081,1082,1083,1084
        orderBy = datetime desc
        max = 1
    }
    # insert the object “10.” only if there is no SINGLE news selected
    10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news
    # re-insert the normal pagecontent to the page
    20 < tmp.pagecontent
}



"Mauro Lorenzutti" <mauro.lorenzutti at webformat.com> ha scritto nel messaggio 
news:mailman.1.1317478373.17360.typo3-ug-italy at lists.typo3.org...
> Salve Ernesto,
>
> potresti settare un id di default mediante le _DEFAULT_PI_VARS:
>
> plugin.tt_news._DEFAULT_PI_VARS.tt_news = 123
> dove 123 è l'uid della news che vuoi venga mostrata nel caso non sia stata 
> selezionata passata news in get
>
> Ciao,
> Mauro
>
>
> Il 30/09/2011 14:57, esetti at interfree.it ha scritto:
>> Buongiorno Mauro.
>>
>> Purtroppo la tt-news in oggetto deve servire anche a visualizzare le
>> news selezionate da un'altra tt_news, quindi deve restare un componente
>> SINGLE. Quello che desidero è che, al caricamento della pagina, quando
>> nessuna news è ancora stata selezionata, la tt_news carichi di default
>> la notizia più recente (o al limite un'altra notizia predefinita) ed
>> eviti l'antipatico messaggio "no news_id given".
>>
>> Grazie per il benvenuto.
>> Ernesto
>>
>> "Mauro Lorenzutti" <mauro.lorenzutti at webformat.com> ha scritto nel
>> messaggio 
>> news:mailman.1.1317386769.12185.typo3-ug-italy at lists.typo3.org...
>>> Salve Ernesto,
>>>
>>> benvenuto nel club di TYPO3 ;-)
>>
>
>
> -- 
> Mauro Lorenzutti
>
> CTO / Software Architect
> mauro.lorenzutti at webformat.com
> Tel.   +39-0427-926.389
>
> WEBFORMAT srl – www.webformat.com
> Via S. Francesco d'Assisi, 6 – 20122 MILANO
> Corte Europa, 12 - 33097 SPILIMBERGO (PN)
>
> TYPO3 Certified Integrator
> 



More information about the TYPO3-UG-Italy mailing list