[TYPO3-dev] Views in TYPO3 database

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Mar 7 17:11:55 CET 2011


Rik Willems schrieb am 07.03.2011 14:18:
> Op 7-3-2011 13:56, Ernesto Baschny [cron IT] schreef:
>>
>> It could work. Try it out and tell us about it, I would say. :)
>>
>> You could get in trouble if the editor wants to "edit" the record. I am
>> pretty sure there will be issues, because TYPO3 won't know its a view
>> and not a real table, and doing an "INSERT" in such a view might get
>> bizarre results.
> 
> Sounds like a plan. I'll try it out and see what happens. A little
> background on what I can expect is important to me though, since I'm not
> a database expert.
> 
> What kind of bizarre results are you thinking of?
> 
> The editor should be able to edit a record. The reason for this approach
> is ease of use. Say the record should be on three pages, the editor
> needs only one page to be able to find and edit the record.

You said you need to "show the same records on different pages". But the
VIEW needs a "pid" field because this is the one that makes TYPO3 select
your row for being displayed in the list view. But what happens when a
new record is created or an existing one is saved? TYPO3 will save the
original "pid" back to the VIEW, starting the confusion (probably).

> Alternatively I could go for a setup like commerce, that has a category
> module to show a tree and lists records but this adds a lot of
> complexity that I'm not looking for.

I understand.

> One other though was to hook/xclass the class.db_list.php or
> class.db_list_extra.php to create the lists I wish in stead of default
> lists.

I would go with this approach, as it is probably most easy to understand.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list