[Typo3-dev] Content Injection / Mapping

Jeff Segars jsegars at alumni.rice.edu
Wed Nov 24 19:03:36 CET 2004


I've been thinking lately about the best way to accomplish generic 
content injection and/or mapping in Typo3 and wanted to get some 
feedback from the community before I start trying to implement anything.

The area where I see this being most useful is things like calendars. 
When creating a calendar, I may want it to contain generic meetings, 
events that require online signup, birthdays, and holidays.  There are 
currently extensions that provide for each of these content types but 
how is it possible to display them all on a single calendar, rather than 
relying on the extensions own rendering functions to show them 
separately?  For viewing a single record, it probably makes sense to use 
the individual extension's rendering function that is specific to all 
the fields in that extension, but for a list or calendar view, some 
global display across several extensions seems better. (The same 
situation exists for news and other common content elements in addition 
to calendars.)

I see 2 options:
1) Providing a very generic CalendarItem class that all "calendarable" 
extensions make use of to render content on the frontend calendar. 
Another option, rather than a class, would be defining an XML schema and 
having each extension export data in the specified xml format. Same 
basic idea, just a different implementation.

2) Providing some mechanism to map fields from one extension to another 
(ie.  map title and date/time from tt_news to title and date in 
sk_calendar).  When executing the query for frontend rendering, this 
mapping would traversed to grab data from all fields that are mapped to.

Either method would require hooks in the extension that does the 
rendering.  Option 1 seems like a cleaner way of doing things but it 
would require additional code in the "calendarable" extensions.

I'd appreciate any feedback on this....trying to decide whether this 
would be useful to people other than myself and whether there's a better 
way of accomplishing it.  I guess what this really boils down to is 
content aggregation and/or the MVC pattern, so I'm open to any comments 
on that as well :)

jeff







More information about the TYPO3-dev mailing list