How do I move and resize the columns?

9 years 5 months ago #730 by dloyer4
dloyer4 created the topic: How do I move and resize the columns?
Right now, the template has what amounts to a three column layout. A wide column to the right that contains the content currently being viewed, and then two narrower columns to the right that generally contain navigation links, feeds, etc.

I'd like to change the layout slightly. I'd like to have the wider, content column between the narrower navigation columns..basically, I want the Right Module to remain all the way to the right, and I'd like to move the Left Module all the way to the left. I know I probably need to edit either the HTML or the CSS, but I'm not sure exactly what I need to do...


Please Log in or Create an account to join the conversation.

9 years 4 months ago #737 by dloyer4
dloyer4 replied the topic: Re: How do I move and resize the columns?
OK, got something figured out.

FYI, since I forgot to mention it before. I'm using the JM-Knights template.

I found a line in the dj_setup.php file that I can change to re-order the columns and the content.

By default, lines 29 through 34 say:

29 // Use the folowing option for quick off LEFT and RIGHT positions displaying
31 $sideBarsScheme = array (
32 //by default
33 'default'=> 'content-left-right',
34 );

If I change line 33 to read:

33 'default'=> 'left-content-right',

I get the exact layout I desire. However, a small change occurs to the background images.

There's apparently a script that counts how many columns are in use and defines this as scheme 1, scheme 2, and scheme 3 (no columns, 1 column, 2 columns). The columns have a slightly lighter background color than the content, so the background image is different depending on the scheme in use. for Scheme 1, the background shows only the darker color found under the content. For scheme 1, there is a 1 column wide area on the right with the lighter column color and for scheme 3, that area is 2 columns wide. This doesn't work when the two columns aren't both on the right side.

Now, I could simply adjust the layout CSS file to call on the scheme 1 background regardless of which scheme is in use, but I'd much rather adjust the php script to identify the 4 potential schemes that could be used. I can create the background images I need, I just don't know how to change the php code.

The 4 schemes I see would be:

Scheme 1: no columns
Scheme 2: 1 column on the left
Scheme 3: 1 column on the right
Scheme 4: 1 column on the left and 1 column on the right.

I believe the section that needs to be modified is somewhere between lines 36 and 58:

36 /***
38 ***/
40 if ($option && isset($sideBarsScheme[$option]) && trim($sideBarsScheme[$option]) &&
41 stristr($sideBarsScheme[$option],'content')!= false){
42 $currentScheme = trim($sideBarsScheme[$option]);
43 } else {
44 $currentScheme = $sideBarsScheme;
45 }
46 if (!$this->countModules('left')) $currentScheme = str_replace('left','',$currentScheme);
47 if (!$this->countModules('right')) $currentScheme = str_replace('right','',$currentScheme);
49 $schemeOutput = '';
50 $currentScheme = explode("-",$currentScheme);
52 if (is_array ($currentScheme)) {
53 foreach ($currentScheme as $item) {
54 if ($item) $schemeOutput[] = $item;
55 }
56 }
58 $currentScheme = "scheme_".count($schemeOutput);

Anyone willing to help? I can attach the whole php file if needed

Please Log in or Create an account to join the conversation.

  • admin
  • admin's Avatar
9 years 4 months ago #743 by admin
admin replied the topic: Re: How do I move and resize the columns?
Since this is a customization issue I am not obliged to give a full response. But Besides changing:
'default'=> 'content-left-right',

You have to change styles also in layout.css for #left and #right columns.
I encourage to use the great tool for firefox to localise CSS styles ->

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds


ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 All rights reserved. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.