[TYPO3-dev] Overloading Extension

bernd wilke xoonsji02 at sneakemail.com
Fri Jun 6 17:18:04 CEST 2008


on Fri, 06 Jun 2008 11:39:05 +0200, Peter Russ wrote:

> --- Original Nachricht ---
> Absender:   bernd wilke
> Datum:       06.06.2008 00:56:
>> on Thu, 05 Jun 2008 21:30:23 +0200, Peter Russ wrote:
>> 

>> I know these different usages:
>> 
>> one folder-tree with the typo3-source (and global extensions) which is
>> linked into different installations with their own local extensions,
>> their own database, their own directories fileadmin/, uploads/,
>> typo3conf/ ...
> 
> that's default ;-)

if you use this it should be easy to have individuall typoscript-
templates for each installation without conditions [1]
you can use your normal templates, 
or you can have local extensions which have more priority than any global 
with individual templates.
or a very specific solution: make symlinks for each file of a global 
extension into a local directory and have the individual files as real 
files
 
> 
>> then you can have multiple domains in one installation. These domains
>> can have differnt page-trees but share one TYPO3-Installation in this
>> way: they have the same database, the same directories and as the same
>> typo3conf-dir the same local extensions. The domains are separated by
>> domain-records which lead a visitor to different pages in the
>> TYPO3-page- tree.
> 
> Old stuff but well used ;-)

individual templates with their individual (re)definition[1] of any value.

> 
>> as on different pages you can also differentiate the typoscript by
>> conditions querying the domains.
>> using these mechanisms you should not get any cache-problems as each
>> typoscript-condition gets its own cache-version of a page.
> 
> condition is not an option as there is no way to place a condition
> within a condition.

you can combine conditions, it may be a littel more difficult but it is 
possible:

[cond1] && [cond2]

[cond1] && [!cond2]

[!cond1] && [cond2]

[!cond1] && [!cond2]

[global]
> 
> So we found a other solution, but have "overhead" or code redundancy. So
> as for now it's working, but perhaps we can find a "lighter" solution.
> 
> what we are doing now:
> in the templates of the different domain, we include different
> contants.txt and setup.txt. The only thing they differ are the files
> included.
> 
> example:
> Domain 1:
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyager/templates/typoscript/mainMenu.txt">
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyagerlocal/templates/typoscript/mainMenu.txt">
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyager/templates/typoscript/leftRecursive.txt">
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyagerlocal/templates/typoscript/
leftRecursive.txt">
> 
> Domain 2:
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyager/templates/typoscript/mainMenu.txt">
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyagerlocal_bse/templates/typoscript/
mainMenu.txt">
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyager/templates/typoscript/leftRecursive.txt">
> <INCLUDE_TYPOSCRIPT:
> source="FILE:EXT:arjuna_voyagerlocal_bse/templates/typoscript/
leftRecursive.txt">
> 
> As you see, we can't work with conditions as there would be no condition
> allowed within the include.

what about a condition outside the include?

[globalString = HTTP_HOST= *.domain1.com]
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:arjuna_voyagerlocal/...> 
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:arjuna_voyagerlocal/...> 

[globalString = HTTP_HOST= *.domain2.com]
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:arjuna_voyagerlocal_bse/...> 
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:arjuna_voyagerlocal_bse/...>

[else]
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:arjuna_voyagerlocal_else/...>
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:arjuna_voyagerlocal_else/...>

[global]

> So we have to thing more to find a solution that reduces the overhead
> and gives a flexible solution.

[1]
what about an override in the normal template?
as you can redifine any rendering-info like from css-content, why not 
domain-specific for this extension?

bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html




More information about the TYPO3-dev mailing list