[TYPO3-english] Please help: Moving from one template to another
pedersen at frm2.tum.de
Tue Aug 16 08:55:45 CEST 2011
Am 16.08.2011 08:46, schrieb Joshua Heinrich Karp:
> I have constructed a site with a single template in TV. Due to some
> cross-browser compatibility problems, I rewrote the HTML and CSS for this
> template. The new HTML is completely different from the old markup, but the
> field structure in the DS should basically remain the same. I would like to
> create a new template in TV with this revised markup and then transfer the
> site over to this new template.
> I tried creating a new TV Data Structure, but when I switched a page over to
> that template all the content from that page vanished -- I assume because
> the file name and/or mapping had changed. That was disheartening.
You should normally just create a new TV template by mapping it to your
new HTML template and then switch the selectedt template on the page.
The file name of the template does not matter.
If you create a new data structure, you have to make sure to keep the
Why: TV uses 3 xml structures for it's templating process:
1.) The data structure where the field names and their BE and frontend
rendering are defined.
2.) The mapping xml (TV template object) where each field from the DS
is mapped to some part of the html file.
3) The flexfield xml in the pages table ( or tt_content for FCE's) where
there content is mapped to the names of the data structure.
So, the field names are the essential key for the content mapping.
More information about the TYPO3-english