[TYPO3] localized labels in template
    Oleg L. Sverdlov 
    oleg at ols.co.il
       
    Thu Jun 29 19:39:44 CEST 2006
    
    
  
Hello,
I have a website with template built according to MTB tutorials. No TV. 
The website owner should be able to edit elements of the template - 
labels, footer/header etc. I've came up with the following approach:
- Created a hidden page with self-describing name, say "TEMPLATE ELEMENTS"
- Created a record on the page for each localized element
- To change label text, the owner will edit each record.
Used a TS construct like
lib.customelement = RECORDS
lib.customelement {
 # remove tt_content custom wrapper
  conf.tt_content.stdWrap.dataWrap = |
 # render only one element
  conf.tt_content.stdWrap.field = bodytext
  dontCheckPid = 1
  tables = tt_content
}
...
page.10 {
  marks.LABEL1 < lib.customelement
  marks.LABEL1.source = 101
  marks.LABEL2 < lib.customelement
  marks.LABEL2.source = 102
 ...
}
where 101 and 102 are records' UID. There are several problems with this 
approach:
1) The website is multilingual, and the approach uses UID's instead of 
page IDs.
2) the solution is not portable between installations (have to change 
.source manually).
3) HTML markup in bodytext is garbled.
Anyone have better idea on how to impmenent it? In the archives I saw 
one post from Dmitri circa 2005, with no replies.
Regards,
Oleg.
-- 
*OLS Software* Websites and Software Development.
Tel./Fax 03-613-2865 , mobile: 054-424-0865
Email info at ols.co.il
URL http://www.ols.co.il
    
    
More information about the TYPO3-english
mailing list