Different page layouts for different content types (sidebar on left for one, on the right for the other)

tvsmvp's picture
tvsmvp
Tue, 04/21/2015 - 14:23
#1
Different page layouts for different content types (sidebar on left for one, on the right for the other)

I see that I can choose for the sidebar to appear on either the left or the right - but how can I have the sidebar appear on a different side for a different content type?  For instance:  How can I have the sidebar appear on the right for articles -- but on the left for my products?  I would assume that I need to create a node template - but I wanted to ask if there was an easier way.

cindy's picture
cindy
Fri, 04/24/2015 - 05:02

Hi,

Please send us your site url and admin account to [email protected] (also this forum link) 

We want to check this

tvsmvp's picture
tvsmvp
Thu, 05/14/2015 - 12:05

I got a response back from "Cindy" suggesting that I change up the CSS.  What I came up with (should  you find yourself in the same situation) is:  

.page-type-products div#sidebar {

 float: left;
}
 .page-type-products div#content {
 float: right;
}
 .page-type-article div#sidebar {
 float: right;
}
 .page-type-article div#content {
 float: left;
}

The above works great - it's simple and works without a hitch.  Thanks to Cindy for the help!  

------------------------------------------------------------------------------------

Here is a copy of the original email from Cindy - it didn't work in this form - but once I was put on the right track, it was a simple thing to adapt the following:

Hi, Please add the following code into file css or into theme setting
 .page-type-products.sidebar-left #sidebar{float: right}  .page-type-products.sidebar-left #content{float: left;}
Regards, Cindy Bui  Megadrupal

phuonght's picture
phuonght
Thu, 05/14/2015 - 22:45

Thanks for your feedback :)

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.