[TYPO3] Basic questions- how do I put text from the fields into pages?

JoH info at cybercraft.de
Fri Aug 11 16:14:21 CEST 2006


>>> Yea, I can do that, but then the text that get's filled into the
>>> html is just hard coded in the template.   If my client wants to
>>> change "Text added from typoscript template", they would have to go
>>> in and change the typoscript code.  Isn't there supposed to be like
>>> a form field the client can use to change the text on a page?

> Ok that's excellent, but what if I have 20 pages, all identical using
> the same template, but I want them to have different content.   If
> the template is explicitly referring to the uid of that tt_content
> record, like in the example you gave, then all the pages would all
> have that same content, right?  How do I make each page use a
> different $the_id_of_the_content_element.  Do I just have to hard
> code that?

Well, maybe you should try to understand the basic concept for content
elements first.
Usually you've got a page containing a set of different elements in
different columns.
The default columns are "left","normal","right","border" - but you don't
have to stick with it, since you can add more columns and name alle the
columns however you like.

So you can have
"topleft","middlecontent","belowmiddlecontent","wherever","andmore"

The difference in the DB is a the value for colPos in the table tt_content.
So when you want something from the "normal" column, the colPos has to be
"0".
Left => 1, Right => 2, Border => 3, YourNewColumn => 4 and so on.

Whenever you do something like "styles.content.get" you are using a
TypoScript element called CONTENT. Inside this CONTENT there is a select
statement i.e. "where = colPos=0".
This is the only difference between "styles.content.get" and
"styles.content.getRight"
getRight the select statement is: "where = colPos=2"

And this is how you can fill as many different markers as you like with
content coming from specific columns of the current page.
When you got to another page, the content will be taken from the same
columns but only the elements of this page will be shown , since the default
for the select statement is using:
"pidInList = this" - which means: Only use those elements that have the
current page as the parent page.

If you understand this concept you will get the rest very easily ...

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com





More information about the TYPO3-english mailing list