Ingredient API changes [13.03.2009]

There have been a few changes under the hood for ingredients recently. All the changes are designed to be backwards-compatible, but there are some neat new aspects to them, and the old way of including them is now deprecated.

Because page ingredients (where you're referring to an action on a particular page) are more involved than site ingredients (where you just drop a template from the ingredients directory into your code), we've split them up into separate calls: page_ingredient and site_ingredient.

Using the old ingredient method continues to work (and will probably never stop working), but we recommend that you move to this new API -- if for now other reason than to make it clear in your head what you are doing with an ingredient.

A bonus: you can now pass local variables into page ingredients, which was not possible before.

There's much more detail on how ingredients now work in the documentation.

Only the comment field is required. Omitting the ID fields increases your risk of being mistaken for spam.

Preview or