[TYPO3] TSConfig restrict languages by pagetree
Grégory Duchesnes
g.duchesnes at free.fr
Wed Aug 13 15:04:59 CEST 2008
Thanks for your hint, i'm not using templavoilà but i will try to
adapt the concept to my case. The only thing i have to find is the
right xclass or hook to unset the undesired language in the list view
of my table.
Anyone knows?
Duch
Le 13 août 08 à 13:21, Xavier Perseguers a écrit :
> Hi Grégory,
>
>> Is there a mean (by TSConfig or anything else) to restrict editiing
>> of a
>> specific language under a given page tree? and this only for a
>> specific
>> user (gasp) since the site administrator should be able to edit
>> content
>> in any language.
>> By the way, contents stored in this shared page tree are not standard
>> CTypes but table entries, so i might be able to digg into the TCA for
>> that, is it possible to make conditions in the TCA?
>
> I did something like that for a website where I wanted the default
> language to be sometimes English, German or French and then being able
> to translate it into the other languages. And for this I had to create
> the English language as another possible language overlay. Default
> language being said to be French, English or German with pageTS:
>
> mod.SHARED {
> defaultLanguageFlag = fr.gif
> defaultLanguageLabel = French
> }
>
> I then had to "remove" one of the available translation languages that
> was shown with TemplaVoila (or the default page form too but I use TV
> and as such did the stuff for it). The idea was to remove French as
> translation in this case when default language was already in French,
> leaving only German and English as overlay languages. For this I
> created
> a new option to mod.SHARED:
>
> mod.SHARED {
> disableLanguages = 2
> }
>
> where 2 stands for the UID of sys_language French in my website and
> then
> XCLASSed TV to use this new option:
>
> class ux_tx_templavoila_module1 extends tx_templavoila_module1 {
>
> function getAvailableLanguages($id=0, $onlyIsoCoded=true,
> $setDefault=true, $setMulti=false) {
> $languages = parent::getAvailableLanguages($id, $onlyIsoCoded,
> $setDefault, $setMulti);
>
> $disableLanguages = t3lib_div::trimExplode(',',
> $this->modSharedTSconfig['properties']['disableLanguages'], 1);
>
> foreach ($disableLanguages as $pid) {
> unset($languages[$pid]);
> }
>
> return $languages;
> }
>
> }
>
> I hope you'll get an idea for your problem.
>
> --
> Xavier Perseguers
> http://xavier.perseguers.ch/en/tutorials/typo3.html
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list