[TYPO3-templavoila] Extensions and TV [was Templavoila mapping problem]

Dmitry Dulepov typo3 at accio.lv
Wed Jul 5 10:53:35 CEST 2006


Hi!

Cate & Peter wrote:
> Specifically, the initial wiki RTE showed, but after "saving", the text
> entered did not appear - in list it was apparent the information had been
> saved, but no reference had been made to the content item, and so it did not
> display.

Did you see it in the TV page module?

> Indirectly is exactly the issue. I am not a coding person, I do not
> understand how Typoscript works, I rely on snippets and the little bit I can
> understand to get me by. If something is not *explicitly stated* I do not
> necessarily make the connection myself. 

Well, typoscript is not coding but configuration language :) It takes 
time to learn but it is worth it :)

> While I recognise these terms (USER, USER_INT), even after 6 months of using
> Typo3 I would have to go back to TSRef to try to understand them. HMenu I
> understand, Text and content I sort of understand. I have not gotten my head
> around the full meaning of a cObject, or its implications for configuring
> things. And knowing my past history, it is unlikely that this will happen
> soon. Therefore, to say that one thing is the same as something else is of
> no further enlightenment to me... it needs to be related to something I
> already understand :) (ie out of the coding world :) )


cObject = Content Object. All output in typo3 is made by content 
objects. There are various types. For example, PAGE, CONTENT, TEXT, USER 
and others are all cObjects.

cObjects may have subobjects. For example, PAGE and COA (COA = 
"collection of objects", do not ask why COA and not COO) have them. 
Others just have properties that define how exactly cObject shows its 
content. For example, page:

page = PAGE
page.10 = TEXT
page.10.value = Hello!

This code says that we define cObject of type PAGE with name "page". 
Typo3 expects always to have one PAGE object. This is like a starting 
point for displaying content.

PAGE object does not generate content himself, he uses inner objects to 
do it, collects their output and gives it to typo3. In the code above it 
finds a single object of type TEXT and asks it do generate content. PAGE 
object does not care how TEXT does it, it just asks and gets something 
as a result.

There are several predefined cObjects types. You can build basic site 
with them using menus (xMENU), content (CONTENT), images (IMAGE and 
IMG_RESOURCE), etc. But if one wants to implement his own functionality, 
he will use USER (or USER_INT) object and program it. This is what all 
extensions (plugins) do: they define a new cObject of type USER. For 
example, templavoila does:

plugin.tx_templavoila_pi1 = USER
plugin.tx_templavoila_pi1 {
	userFunc = tx_templavoila_pi1->main
}

If PAGE cObject (or any other cObject that can have sub-cObjects) finds 
USER, it gain asks it for content. USER know what do to: he calls 
userFunc and returns its output to the caller. This is how it all works 
in brief.

> Don't misunderstand. I am not a newbie to coding. I had my first experience
> 22 years ago with BASIC, moved on to Pascal, then took a break for some
> time. Came back 6 years ago to html, then php (which is still a mystery to
> me) and css. Now TS. I will get it eventually, it just takes me a very long
> time.

No problem. But make sure you read "TypoScript by example" and closely 
watch TSRef for each discussed object.

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