What is the common approach/design pattern to build a web page with provides multiple group of possibly unrelated data. Eg. facebook – there are multiple sections in these pages like my friends list, my wall, ads… all these must be fetched and formatted separately. How to aggregate these contents. I can design things as a single page template, but would like to know which is the best approach to be used these scenarios. (I am using django,python and JS)
thanks,
Den
There are two commonly used approaches. One is you can create custom template tags, and the other is to use template context processors.
Either way, these allow you to put data that is common to all pages into say a common base template. Your other site pages use template inheritance from the base template to get that extra content.
I find myself writing a lot of custom inclusion tags, but I know others prefer context processors.