hi ya, ya i need a totally different template.
On Feb 26, 11:06 pm, Laszlo Antal <[email protected]> wrote: > Hi, > > On Feb 26, 2011, at 0:23, mongoose <[email protected]> wrote: > > > Ok I have put in a > > > {% block header-banner %} > > {% endblock %} > > > into my base page. But still how do I specify which category template > > to use depending on which category was selected? > > That was my question. Do you need a totally different template or just want > to change the header image. > > lzantal > > > On Feb 26, 3:41 am, Laszlo Antal <[email protected]> wrote: > >> Hi, > > >> Not sure if I understand correctly what you're trying to accomplish. > >> Do you have a website header image and you want to change that based on > >> the category the customer is looking at? > >> If that's all then you just need to put your default header image into a > >> block in your template and override that based on the category. Or use a > >> templatetag. > > >> lzantal > > >> On Feb 25, 2011, at 14:46, mongoose <[email protected]> wrote: > > >>> Hi > > >>> I might be over complicated this. I just want to change the header > >>> banner depending on what product category was selected. > > >>> I'm in product > views.py and thought I could edit def category_view > >>> to change the template that gets rendered out. > > >>> I tried adding something like this to the def > > >>> def category_view(request, slug, parent_slugs='', template='product/ > >>> category.html'): > >>> """Display the category, its child categories, and its products. > > >>> Parameters: > >>> - slug: slug of category > >>> - parent_slugs: ignored > >>> """*omitted code* > > >>> if category.slug = 'healing-products' > >>> template ='product/category_healing.html' > >>> elif category.slug = 'beauty-products' > >>> template ='product/category_beauty.html' > >>> index_prerender.send(Product, request=request, context=ctx, > >>> category=category, object_list=products) > >>> return render_to_response(template, > >>> context_instance=RequestContext(request, ctx)) > > >>> But it doesn't work. Is there a better way to do this or is my syntax > >>> just incorrect. > > >>> Thanks. > > >>> -- > >>> 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 > >>> athttp://groups.google.com/group/satchmo-users?hl=en. > > > -- > > 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 > > athttp://groups.google.com/group/satchmo-users?hl=en. -- 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.
