Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Ecommerce page layout problem - 2 sidebars

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 928 Views
  • Pixel
    Avatar
    Community Member
    78 Posts

    Ecommerce page layout problem - 2 sidebars Link to this post

    Hi. I have been using the ecommerce module for the first time and was using a two column site layout in which the ecommerce module sat on the left with its sidebar and then the general Page sidebar used throughout the site for second and third tier navigation sat on the right with an advert below.
    However the clients have now decided that they want a 3 column design with the general navigation on the left, then content and then the advert on the right. But by doing this the ecommerce pages now have 2 sidebars on the left - which isn't wanted.
    Does anybody know how i can remove the general Page sidebar?
    I can quite happily create new templates for pages that require a different layout such as the home page but how would i do this for a module?

    Please view the attachment

    Thanks in advance

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Ecommerce page layout problem - 2 sidebars Link to this post

    Does anybody know how i can remove the general Page sidebar?

    You would just need to tweak the Page.ss file in your theme, Depends on what theme you are using as a base - the sidebar might be included via a <% include Sidebar %> or something like that.

  • Pixel
    Avatar
    Community Member
    78 Posts

    Re: Ecommerce page layout problem - 2 sidebars Link to this post

    It is only the ecommerce pages in which i wish to drop the sidebar but because it is a module i am not sure how to do this.
    Would i need to create a new template in which the ecommerce module pages would extend from?
    I am using Blackcandy as my base.

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Ecommerce page layout problem - 2 sidebars Link to this post

    Dont know if theres a easy way to do this but you may need to create a template file in blackcandy/templates/Layout/ for each of the page types? Eg for the Products page you would need a Product.ss file which doesnt have a <% include Sidebar %>.. etc etc for each page type. Or you could wrap a if round the <% include Sidebar %> which checks for ecommerce page types eg

    <% if ClassName = Product %>
    <% else %>
    <% if ClassName = ProductGroup %>
    <% else %>
    <% include Sidebar %>
    <% end_if %>
    <% end_if %>

    Its pretty ugly as you have to check for each page type...

  • Pixel
    Avatar
    Community Member
    78 Posts

    Re: Ecommerce page layout problem - 2 sidebars Link to this post

    The if wrap seems to be a good solution. Just need to play with the ecommerce CSS a little bit.

    Thanks for the help

    928 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.