[TYPO3-UG Italy] Typoscript elencare fe_groups in pagina

Roberto Torresani typo3 at torresani.eu
Thu Mar 12 17:31:34 CET 2015


Ciao Riccardo,
problema typoscript? Eccomi ;-)

E' probabile che dedicandoci un po' più di tempo lo script possa essere
migliorato, ma il seguente dovrebbe fare quello che ti serve:

PAGE.10 = TEXT
PAGE.10.data = TSFE:fe_user|user|usergroup
PAGE.10.split {
  token = ,
  cObjNum = 2 || 1
  1 {
    10 = CONTENT
    10.table = fe_groups
    10.select.pidInList = {$plugin.tx_felogin_pi1.storagePid}
    10.select.andWhere.current = 1
    10.select.andWhere.wrap = uid=|
    10.renderObj = TEXT
    10.renderObj.field = title
    10.renderObj.wrap = ,|
  }
  2 < .1
  2.10.renderObj.wrap = |
}

Ciao
Roberto


Il giorno 12 marzo 2015 17:05, De Contardi Riccardo <
Riccardo.DeContardi at bhuman.it> ha scritto:

>  Buongiorno a tutti:Uso TYPO3 6.2 e ho il seguente problema: ho degli
> utenti di Frontend che possono appartenere a N gruppi diversi e vorrei
> stampare in pagina il nome dei gruppi a cui appartengono, separati da
> virgola:
>
> Per ora sono arrivato a scrivere (copiando da
> http://www.typo3wizard.com/en/snippets/cool-stuff-typoscript/userinfo-for-currently-logged-in-user.html)
> :
>
>
>  PAGE.10 = TEXT
> PAGE.10.data = TSFE:fe_user|user|usergroup
>  PAGE.10.split {
>     token = ,
>     cObjNum = 1
>     1 {
>       10 = CONTENT
>       10.table = fe_groups
>       10.select.pidInList = {$plugin.tx_felogin_pi1.storagePid}
>       10.select.andWhere.current = 1
>       10.select.andWhere.wrap = uid=|
>       10.renderObj = TEXT
>       10.renderObj.field = title
>       10.renderObj.wrap = |,
>     }
>   }
>
> Il problema è che così sono tutti seguiti dalla virgola, compreso
> l'ultimo... e io vorrei che l'ultimo sia senza virgola... ho provato varie
> configurazioni di optionsplit senza successo :(
>
> Qualcuno ha dei suggerimenti?
>
> --------------------------------------------
> Riccardo De Contardi - Web Developer
> B Human Srl - www.bhuman.it<http://www.bhuman.it/>
> Riccardo.decontardi at bhuman.it
> Corso di Porta Nuova, 46 - 20121 Milano
> TEL +39-02-20.23.271 - FAX +39-02-20.240.561
> --------------------------------------------
>
>
> **************************************************
>
> Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non
> gli sia pervenuto per errore. In tal caso e' pregato di avvisare
> immediatamente il mittente e, tenuto conto delle responsabilita' connesse
> all'indebito utilizzo e/o divulgazione del messaggio e/o delle informazioni
> in esso contenute, voglia cancellare l'originale e distruggere le varie
> copie o stampe.
>
> The receiver of this message is required to check if he/she has received
> it erroneously. If so, the receiver is requested to immediately inform the
> sender and - in consideration of the responsibilities arising from undue
> use and/or disclosure of the message and/or the information contained
> therein - destroy the original message and any copy or printout thereof.
> _______________________________________________
> TYPO3-UG-Italy mailing list
> TYPO3-UG-Italy at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>



-- 
TYPO3 CMS 7.1 - Le novità <http://slidesha.re/17WfVqV>


More information about the TYPO3-UG-Italy mailing list