Changing the way we handle theme() calls is great, but what about the data we're passing them? Currently it's a mish-mash of various numbers of arguments, data types, etc. Here's another place the Forms API shines. We pass a well defined, structured data set. Clean separation of content and presentation. While we're making changes, we could consider a full move to a Forms API approach for all data passed to theming. Likely doing so would greatly simplify the theming system. * 'node', 'block', etc. element types * generate the whole page as a nested array data structure and then pass once to theming (Then if someone wants e.g. to use XSLT to generate a full SVG environment, easy. Serialize the data array as XML, pass to the XSL, done.)
Here's another place the Forms API shines. We pass a well defined, structured data set. Clean separation of content and presentation. That is so true.....
While we're making changes, we could consider a full move to a Forms API approach for all data passed to theming. Likely doing so would greatly simplify the theming system. it won't solve the defaults problems
On 04 May 2006, at 6:28 PM, Nedjo Rogers wrote:
Here's another place the Forms API shines. We pass a well defined, structured data set. Clean separation of content and presentation. Forms API as it stands is a misnomer.
The reason I did it (personally) was for the render API part of it. Which is exactly what you are interested in here. I have started writing a bigger design document on the theme / template stuff as it stands currently, and after that I am going to start writing one for FAPI 2.0. I believe it is important that we migrate towards this, but I think perchance it's a 5.0 goal and not a 4.8 one. -- Adrian Rossouw Drupal developer and Bryght Guy http://drupal.org | http://bryght.com
Here's another place the Forms API shines. We pass a well defined, structured data set. Clean separation of content and presentation.
Forms API as it stands is a misnomer.
Amen to that. Going forward, if anything should be called "Drupal API", it is FAPI. Did anyone notice that we have a knack for these misnomers? For example "menu" is links on blocks, the "path" system, and later the menu callback system. Confusing to those who are not familiar with it. Not a big show stopper certainly, in my opinion, but something that if improved would help communicating to users (admins and developers in particular). Regards
participants (4)
-
Adrian Rossouw -
Khalid B -
Nedjo Rogers -
Vladimir Zlatanov