Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

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

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

Ecommerce page layout problem - 2 sidebars


Reply

5 Posts   942 Views

Avatar
Pixel

8 July 2008 at 12:22am (Last edited: 8 July 2008 12:25am), Community Member, 78 Posts

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

Avatar
Willr

8 July 2008 at 12:48pm Forum Moderator, 5511 Posts

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.

Avatar
Pixel

8 July 2008 at 8:14pm Community Member, 78 Posts

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.

Avatar
Willr

8 July 2008 at 9:06pm Forum Moderator, 5511 Posts

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...

Avatar
Pixel

8 July 2008 at 10:15pm (Last edited: 8 July 2008 10:17pm), Community Member, 78 Posts

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

Thanks for the help