I am trying to create my first subtheme for fusion and want to alter the sidebar and content width for certain node types.

Naturally I could alter the class of the grid in hook_preprocess_region, but that doesn't seem very elegant. Is there a possiblity to alter the width so that it will correctly be processed (taking theme settings into account)?

Comments

ravis’s picture

For me editing CSS should be best way.

archnode’s picture

This would certainly be the easiest way, but I want to avoid altering css of the grid layout structure, which would essentially be necessary with this approach.

stephthegeek’s picture

Status: Active » Fixed

There currently isn't the capability to do different sidebar widths on different pages, because they are handled by a single set of theme settings. This has come up a couple of times so we'll be looking at it at some point in the future, but it's roll-your-own in the meantime.

I did this quick'n'dirty once for a certain content type by doing a body.node-type .region-sidebar-first.grid-4 { width: XX; } kind of thing, which definitely works but depends on how much of this you're trying to do :)

aquariumtap’s picture

Status: Fixed » Postponed

Setting to postponed, but would like to encourage feedback for a potential solution. A couple ideas that come to mind:

  • Currently there is a site-wide setting for the width of sidebar-first and sidebar-second. Now that regions are skinnable in Skinr 7.x-2.x, we could stop using theme settings and rely on Skinr instead. This would only be feasible if a default value could be set for a skin by the theme, and I believe that's not yet the case (could someone confirm?)
  • Leverage the Context module to override theme settings (eg: sidebar widths) as a reaction. We might include this as a Context plug-in in the upcoming Fusion Accelerator module.
stephthegeek’s picture

Correct, no default values for skins, although it's something I've been pushing for. We may rethink the layout in a bigger way for Fusion 7.x-2.x, to address these kinds of deeper feature requests.

thomaslucas’s picture

+1 subscribing, I need to change the last sidebar width to a little wider for a particular node type on my acquia slate in 6.20

sheena_d’s picture

Version: 7.x-1.x-dev » 7.x-2.0-beta1
Status: Postponed » Fixed

Utilizing the patch in #1397838: Theme Settings form should derive the theme's name from a more reliable variable you can use the Delta module to set different sidebar widths based on criteria set via the Context module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.