Thanks Steve, After some investigation I agree with you and the custom template tag seems the best way to go.
Satchmo already has a template tag "category_tree" that I was able to copy into my own app and modify. Paddy On Jan 12, 6:07 pm, Steve Potter <[email protected]> wrote: > On Jan 11, 11:59 pm, Paddy Joy <[email protected]> wrote: > > > I would like to customise my satchmo store so that it has a list of > > root categories and thumbnails on the shop home page instead of the > > featured products. What is the best practice for getting a list of > > categories into the index.html template? > > > I know I can edit the satchmo views and add > > Category.objects.root_categories() to the template context but this > > will make updating satchmo a pain in future. > > > Paddy > > I haven't yet spent much time with the Satchmo templates to see what > context variables are available to them. > > That being said if it were me I would first examine how that > categories are being displayed for the menu and see if I could make > use of that. > > The second choice if that doesn't work would be to create either a > custom template tag to display the information you would like, or a > custom context processor to make the appropriate information available > in your context. > > I would personally lean toward the custom template tag so I could re- > use it in future sites. Also you could make it available to other > Satchmo users that may find it useful. > > Satchmo snippets site anyone? James Bennett already wrote the > codehttp://code.google.com/p/cab/ > > Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en -~----------~----~----~----~------~----~------~--~---
