robos85 - there are a couple ways to go - - context processor: this can add a set of context variables so they are available in every template - very easy to write - just a function that takes a request object, returns a context dictionary. Add to your CONTEXT_PROCESSORS setting http://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-context-requestcontext - if it's a lot of stuff, your CP could be conditional based on which sub-site. - template tags (as suggested above) - you'll need a different templates for each unique sub-site (or conditional logic in your template) - write your own template tags (I often use Inclusion Tags for this kind of thing - they are so easy to implement: http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags)
good luck. On Nov 21, 3:54 am, robos85 <prog...@gmail.com> wrote: > I'm wondering how to make a sidebars on my site. Main content is not a > problem - I use views to do that. What about the rest of site content? > I want for example to have last comments, last posts, the most popular > posts and the most rated. How to plan that. Which Django structures > should I use? > Additionally I want to have different sets of that content of > different sub-sites. > > Thanks for clue. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.