Project

General

Profile

Actions

Feature #15800

closed

Extending MM tables to have attributes attached to an entry and make it editable

Added by Jochen Rieger over 18 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-03-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Based on the thread "edit mm tables in backend forms with TCA" in the dev list, Ernesto, Franz and I would like to implement a feature described as follows:

In a relational DB system sometimes you have the need for attaching attributes to a record in an MM table.

Example:

tx_books:
uid, title, articles, ...

tx_articles:
uid, title, ...

tx_books_articles_mm:
uid_local (books), uid_foreign (articles), sorting (required), page_number (normal attribute)

In this example the page number (or any other desired information) is stored in the MM relation as it belongs to a specific book / article combo.

In order to get this done, the TCA should get another option like "MM_With_Attributes" that will provide the information neccessary for the described MM table.

Concerning the backend form for editing several ideas were described in the dev list thread. For example:

1) Self extending fieldset
When editing a book record you get a palette or sheet that contains a select field (element browser / selector box / whatever) to select the related article as well as all the fields configured in the new TCA option. In this case: the page_number field. After filling in and saving a new empty fieldset will be created (always one more than entries found in the MM table).

2) Extend button
Same as 1) but with a field / button that indicates to render another set of fields after saving / reloading. (see templavoila section container in FCEs).

3) browse_links popup
We only have the typical select for records and in the popup we will have the additional fields that have been configured via TCA.

Additionally some kind of up / down buttons would be needed for sorting.

record-1: <title> [down][up][edit][del]


Ernesto, Franz, all the others feel free to add information and suggestions to this.

(issue imported from #M2822)

Actions #1

Updated by Ingmar Schlecht about 18 years ago

This is an interesting and useful feature. Maybe someone will use the sponsoring feature of the bugtracker to make it happen :-)

Actions #2

Updated by Franz Holzinger about 18 years ago

This needs a lot of patches in many functions used by TCE. I have already started with it. It will need a lot of testing and changes in some tables. Whom can we ask about it?
But is it possible to put already some small parts of these patches into TYPO3?

Actions #3

Updated by Michiel Roos about 18 years ago

Do these kind of attributes really belong in the mm table? Who but the application code could decide if the 'page' field says something about the book or the article it is linked to?

One problem immediately arises using the proposed technique with the book example:
- only one bookmark per book is allowed!

Why restrict yourself in this way?

Can this not be solved in a cleaner way? I thought the trick of the mm tables was strictly to point out the 'relations' between two tables, just what is linked to what.

Adding extra 'pointers' to the mm table makes things more complicated than they already are.

In the book example you should add a bookmarks table. This table would have the bookmark_id, book_id, bookmark_desctiption and page fields. An yes, you should build up the relation to a book and its bookmarks with a mm table.

This makes coders do more of the gruelling mm select tricks, but keeps the mm tables clean.

Actions #4

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Closed
  • Target version deleted (0)
  • PHP Version deleted (4)

No response since over one year => closed.

Actions

Also available in: Atom PDF