User:Dantman/Skinning system/Template syntax/templates + php

Originally the idea was there would be a template api and a php api. However after experimenting with  and seeing the ugliness that a simple   expands to I've found really good quality skinning is in some cases close to impossible to the php api or just plain too ugly (lang="mw:user"'s intelligent stripping of lang attributes can't be done reliably in a way compatible with improvements to our multilang support the way it can with templates, and I really don't like continuing the ugly way we do script tags).

I do have one potential idea to get the flexibility of having a php api and a template api, while getting the advantages of both, not losing the advantages of the templating when using php. Instead of defining a template to use for the body, the body method is always used, and it's "that" output that gets passed through the template. So instead of doing  you use. If you don't need any special php processing the default body method will just output the contents of the template so it will be handled.

I may have to mull some of this over though. There were some ideas like the extraction of region information from a template. I need to examine if there is anything in the way of providing that ability by doing it this way.