[TYPO3-mvc] FED SQL Query with sys_language_uid

Claus Due claus at wildside.dk
Fri Feb 3 13:26:04 CET 2012


Perhaps a better solution:

If you set the system language as a TS variable on your site, you should be able to...

plugin.tx_fed.settings.myCustomVariable < config.sys_language_uid

And then in the template you should have {settings.myCustomVariable} with the value of config.sys_language_uid.

Hope this works. Untested.

--
Cheers,
Claus
http://fedext.net

On Feb 3, 2012, at 1:20 PM, Claus Due wrote:

> Hi Chivy,
> 
> To do this properly (reading the language dynamically) you would need to have either a ViewHelper for that or use a regular Extbase plugin.
> 
> Using FED's Template Display plugin you can only set hardcoded values. In your case and relating to my example, you should enter this in the "template variables" field when editing the Template Display plugin:
> 
> {"theVariableWithLanguageUid": 1}
> 
> The "1" is of course the language UID.
> 
> I recommend the ViewHelper approach but unfortunately, there is no ViewHelper in either Fluid or FED which presently can return the UID of the currently selected language. You're always welcome to add a feature request on Forge (your best bet would be in FED since Fluid will change very little, very slowly).
> 
> --
> Cheers,
> Claus
> http://fedext.net
> 
> On Feb 3, 2012, at 6:11 AM, Chivy Lim wrote:
> 
>> Hi Claus,
>> 
>> Your conditions is correct, but I don't know how to assign variable "theVariableWithLanguageUid" into template. Could you explain how to if I use FED "Fluid Template Display" plugin?
>> 
>> Thanks,
>> Chivy
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list