[Typo3] Typoscript: yet another conditions question (2nd round)

Paolo Nugnes paolonu at libero.it
Thu Apr 14 21:12:42 CEST 2005


Hi Joey,

> I don't know how you want to use tose "labels".


Right, i gave not enough infos on where datas come from and how i want them 
to be shown.

> Are they filled with content from DB or is it more like a header that is 
> set
> via TS?


Labels are taken from db to take advantage of the typo3 localization skills.

> How does your DB structure look like?
> Do you have a field for each content and label up to contentN?

I have a field for each content and section label.

> Any visual examples?

Here we go (i use generic names just to let be this thread useful to others 
typo3 users, don't blame me ;):

all datas are filled with content from db so labels are specifically made 
fields in the DB to be section headers:
Typoscript:
section-label1.required = 1
section-label1.wrap = | <br />
field1.required = 1
field1.wrap = | <br />
field2.required = 1
field2.wrap = | <br />

section-label2.required = 1
section-label2.wrap = | <br />
field3.required = 1
field3.wrap = | <br />
field4.required = 1
field4.wrap = | <br />

section-label3.required = 1
section-label3.wrap = | <br />
field5.required = 1
field5.wrap = | <br />
field6.required = 1
field6.wrap = | <br />

e.g.
Typoscript:
lastAndFirstNameLabel.required = 1
lastAndFirstNameLabel.wrap = | <br />
firstName.required = 1
firstName.wrap = | <br />
lastName.required = 1
lastName.wrap = | <br />

addressLabel.required = 1
addressLabel.wrap = | <br />
address.required = 1
address.wrap = | <br />
streetNumber.required = 1
streetNumber.wrap = | <br />

townLabel.required = 1
townLabel.wrap = | <br />
townName.required = 1
townName.wrap = | <br />
zipCode.required = 1
zipCode.wrap = | <br />

It happens that i want to show those datas (already filled in the db) in 
this way
--------------------------
First and last name
Johan
Richt

Address
SucheStrasse
34

Town
Koeln
32451
--------------------------
First and last name
Giovanni
Giusto

Address
Via Qualunque
52
--------------------------
First and last name
John
Right

Town
London
--------------------------

Now, it could happens that i know name, last name and town of a people but 
not his complete address, so i need not to show the label of the section.
Wrapping is made by typoscript setup with db field-names corresponding to 
setup fields by php.

That's it
Hope i've been more clear, now. In case i've been not, tell it and i'll give 
the information u need.

Thanks again
Paolo Nugnes 





More information about the TYPO3-english mailing list