[TYPO3] Templavoila: switching DS/TO on a page

Rino Razzi razzi at archicoop.it
Wed Jul 4 10:06:20 CEST 2007

Hi Dmitry.

At 13.38 03/07/2007, you wrote:

>Rino Razzi wrote:
> > As you suggested, I tryed to do a new TO with the same DS as described
> > in FTB1. I defined the TO as a subtemplate of the main TO and selected
> > Printed Friendly as type of rendering. The problem is that when I go to
> > map the new TO I can't get the new mapping saved. After saving I always
> > have this message at the bottom of Templavoila Template Mapping page:
> > "The current mapping information is different from the mapping
> > information in the Template Object". In fact if I exit and come back to
> > Templavoila Template Mapping page all the mapping made before is lost.
>Most likely HTML is invalid. TemplaVoila, in fact, requires xhtml (all
>tags closed properly, etc). Try http://validator.w3.org/ and see what it
>tells you.

You were right, the problem was in the HTML file. There were many 
errors.... I trusted too much my web designer :-(
After correcting HTML all is running us described in documentation.
Following a describe how have I solved my problem, may be it's 
helpfull for other readers of the list.
Finally I haven't used the "print version" to manage accessible 
version as you suggested, but I created a new rendering type named 
"accessible" as described at this page 
Then here is what I did:
- first, in TSConfig of root page of the site I inserted this:
TCEFORM.tx_templavoila_tmplobj.rendertype.addItems.accessible = 
- second, in setup of main TS Template I inserted this:
[globalVar = GP:accessible> 0]
page.10.childTemplate = accessible
- third, in setup of main TS Template I constructed the link to 
accessible version as follow
lib.versionLink = TEXT
lib.versionLink.htmlSpecialChars = 1
lib.versionLink.data = getIndpEnv:REQUEST_URI
lib.versionLink.wrap = |&accessible=1

- finally, in setup of main TS Template added "accessible" to linkVars

config {
linkVars = L,accessible

> > Is the problem that the HTML templates of  Accessible and Normal Version
> > are completely different? In the normal HTML template we use TABLE, TR,
> > and TD tags, while in accessible HTML template we use only DIV, LISTS
> > and P tags. Then, if I undertood about use of DS and TO  I think it is
> > difficult to share the same DS i this case. Or not?
>No. DS describes fields, it does not know anything about HTML or tags.
>TO says what tag belongs to what field. So you can have one DS and
>unlimited number of TOs with *any* markup.

Ok, I learned a bit more about Templavoila DS and TO.
Thank you very much fro your help.

>Dmitry Dulepov
>TYPO3 freelancer / TYPO3 core team member
>Web: http://typo3bloke.net/
>Skype: callto:liels_bugs

Rino Razzi 

More information about the TYPO3-english mailing list