[Typo3] Share template files?

A-san amir219 at sbcglobal.net
Sun Oct 23 23:27:22 CEST 2005


Alex Heizer wrote:
> A-san wrote:
> 
>> Dmitry Dulepov wrote:
>>  
>>
>>> Hi!
>>>
>>> Amir Mualem wrote:
>>>
>>>   
>>>
>>>> Is it possible to share a typoscript template record/file between two
>>>> pages that are side by side on the hierarchy?  I would like to manage
>>>> one template for different sites/subsites.
>>>>
>>>> http://img.photobucket.com/albums/v289/Amirsan/hierarchy2.jpg
>>>>
>>>> As you can see in that image, the page circled in blue is the one that
>>>> has the template, and the pages circled in red is the pages that I 
>>>> would
>>>> like to share the template file with.  I dont want to have to update 
>>>> the
>>>> template file for each site either.
>>>>     
>>>
>>> 1. Create a page under "Root" and put the template there.
>>> 2. Move all pages inside this new page
>>> 3. For all pages edit page header and set "site root" check and unset
>>> "clear ..." check.
>>> 4. create extension templates as necessary on each page.
>>>
>>> This is the easiest way. It has its own drawbacks (for example, you'll
>>> have to specify site title in TS instead of tempate record header).
>>>
>>> More complex way uses sysfolder to store templates and includes them to
>>> your site template (just like standard templates do).
>>>
>>> Dmitry.
>>>   
>>
>>
>> Ok, I have a specific question here.
>>
>> On step 3 you say to set site root in page header, however I checked, 
>> and there is no option like that in the page header.  I dont see it 
>> anywhere.
>> _______________________________________________
>>
> Make sure to select the "Show secondary options (palettes)" checkbox at 
> the bottom of the page, then in the   "General Record Storage page:" 
> section, you should see another checkbox that reads " Is root of website:".
> 
> I personally have found it easier to make a sysfolder page, then place 
> all the templates within this page. When you make a new page tree / 
> subsite, go into the template of the main page of the subsite, and look 
> for the box that reads: "Include basis template:" and navigate to your 
> sysfolder. Keep in mind that the order of the templates within your 
> sysfolder may affect some things. Make sure your main template is first 
> in the list when you view the sysfolder in List view. If it isn't, cut 
> and paste any templates that are above it to lower down in the list.
> 
> Alex
> 

Well that is what I first intended on doing.  I want to keep the 
template, FCE's, datastructures, objects in one sysfolder and have all 
subsites use that.  So when I want to change the whole site, all I have 
to do is change one FCE or the one template.

I assume that if I need to do something for a specific subsite I just 
make a template extension.

Therefore if I want to do this then I should forget about site root and 
just make all the subites point to the same sys folder as the general 
records storage?

--Also, will I encounter anything awkward if I try to make subdomains 
for each of the subsites?



More information about the TYPO3-english mailing list