[TYPO3] Custom TS actions based on Usergroup or specific User-property

Christopher Torgalson bedlamhotel at gmail.com
Thu Jun 12 15:56:16 CEST 2008


Hi,

On Thu, Jun 12, 2008 at 3:47 PM, Esben Maaløe <acebone at gmail.com> wrote:
> Hi!
>
> I am new to the list, so if I violate any etiquette, let me know :-)
>
> My question:
>
> I am doing a site for a company that administrates rented flats.
>
> The target-users for this site are the tenants in these flats.
>
> The flats are divided into several "divisions" (by geographical location of
> the flats)
>
> When tenants sign up to the site (I am using EXT:sr_feuser_register for
> this), they are given an option to tell the system which "division" they
> belong to (I have extended the fe_userobject with a "division" property).
>
> Some of the content served on the site, should be dependent on this
> "Division" property.
>
> An example could be "Latest forum messages in forum XX" where XX of course
> is the name of the division. A tenant from division 1 should be shown the
> latest messages from forum "Division 1" when he logs in.
>
> Ideally I would like sr_feuser_register to automatically add a new user to a
> fe_usergroup based on which division the user claims to belong to. It would
> then be trivial to set up a TS condition a la:
>
> [usergroup = XX]
>    # Do XX stuff here
> [end]
>
> And do stuff from there.
>
> However I've looked in the code for sr_feuser_register - and it is too
> complex for me to get to the bottom off. The guys who wrote it are very much
> into Typo3 and they're of course using their knowledge to the fullest. Alas
> that makes the code very opaque to me, 'coz I am not at all very well versed
> in Typo3 on the core-level.
>
> Another option:
>
> Based on the value of the "division" property of the currently logged in
> user, execute this and that TS. In other words, set up a condition based on
> the "division" property.
>
> #Following syntax is not working - i am looking for a syntax that WILL work
> [user:division = XX]
>  # show XX stuff here
> [end]
>
> But I've read the TSRef.sxw - and judging from that, it is not possible to
> set up a condition like that?
>
> Any hints on what to read up on, any help, any inspiration to do the same
> thing but in another way - ANYTHING that can get me further would be
> awesome.


Return to the TSref ;-)

But this time, look at the CASE cObject (it works more or less like
"switch" in PHP.


-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list