[TYPO3-templavoila] Possible to reference DS-Content (without the belonging TO)

Dmitry Dulepov typo3 at fm-world.ru
Tue Mar 7 18:43:51 CET 2006


Hi!

Thomas Broeker wrote:
> in the FTB-manual there ist mentioned that field names should be reused
> as that "enhances the internal compatibility".

Yes, I will explain what it means later.

> And another subject is that content elements have to be brought into the
> "hierarchy of references going from the page to the elements".

A bit cryptic explanation. It means that:
- before TV references to pages were stored in content elements
  (tt_content table)
- TV stores references to content in the page record
  (txx_templavoila_flex)

This is what was meant by "hierarchy of references going from the page
to the elements". It has nothing to do with reusing names (see futher
about reusing).

> Well, my idea was that the references only refer to the content of a DS.
> But my impression is that it refers to the complete object, i.e. DS+TO.

DS defines your data. TO defines how data is presented on the screen. It
is important to remember these concepts.

> What I would like to do:
> On 'Page X' I saved an article 'Article 1' with a FlexForm using the
> DataStructure 'DS:Article'. On that page this article is displayed using
> the 'TO:Article_complete'.
> On another page 'Page A' I also wanted to refer to that article ... but
> .... using the 'TO:Article_teaser' that is also based on the
> DataStructure 'DS:Article' to display the article.

This depends on how exactly you refer to it. If you use "Insert records"
or something, it will not work because the record defines DS/TO pair.
You cannot list the same record with different TO right now. It may be
possible in the future, we think about adding such functionality.

> But unfortunately it didn't work as I expected. I could refer to the
> article. But only to the complete Article, i.e. into the CE-container I
> could only insert "Article 1" automatically using 'TO:Article_complete'.

Yes, because you thought that record is flexform with FCE data. But
record is more than flexform, it is a collection of many properties and
flexform is only one of properties (like DS/TO, for example).

> Is my idea of referencing content wrong? Or did I do something wrong
> referencing it?
> I don't know. It's the first time for me that I use TV and I would
> appreciate a hint ;).

Ok. It is much easier to explain reusing with example. Imagine that you
have a DS with various fields. You made a first version of your site,
deployed it, etc. After a year you need to develop completely new
version. You need to change DS but you want to keep your data. What you
will do is you will reuse field names in new DS. This preserves
compatibility with all your old data but allows you to add other fields
or change fields as you need.

Another use case. You have two various DSes that handle data differently
but data is compatible in general. You may want to use the same field
names to ensure that you can easily switch DSes.

Dmitry.
-- 
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-project-templavoila mailing list