This is a very broad question, so I expect a pretty broad answer.
I have created websites where an admin can post articles, however they would fall into a specific format. for example
title, date, image, article body
What sort of techniques would I use to make a system where an admin could post the elements in an article in different combinations.
title, date, image, code, body, code, image, image, code, body
something like that? Obviously if the person knew html they could just write it all manually, but what techniques do movie review websites, or news websites use in order to allow articles of different forms to be posted.
Usual WebCMS do not have a flexible structure like that, but multiple database content tables and output plugins etc. to combine articles with images and a comment section for example. And more usually you only have a single body/content field for each article/page, with images or other content just assigned by reference and stored elsewhere.
However if you really insist, you could create a database scheme which is made up of core fields (title, date, id) and a separate list of page “attachments”. The attachment table would have a reference (id) to the core article/page table with the meta fields, and attach either a type=body or type=image or type=code or type=comment block. Basically something like:
However that’s really unusual, as it’s more overhead than necessary. The common approach is to constraint the page types and structure, and use individual output handlers or indeed completed html pages.