: "top" module sizes : Matt-K February 21, 2010, 11:55:12 PM The way I'm looking to use the "top" module positions is the following:
- top_2 position will be for news article titles - top_3 position will be for a 468x60 banner (which will run over top_4 - top_5 will be for a smaller banner ad How can I adjust the width of each module? Logically thinking, these modules will not change sizes after we set them. Thanks : Re: "top" module sizes : mikek February 22, 2010, 08:39:49 AM Hello, they are set by percentages so you will have to do some guess and check to get the right sizes. If you edit index.php and find:
if ($this->countModules("top_2") && $this->countModules("top_3") && $this->countModules("top_4") && $this->countModules("top_5")) { $top_row="25%"; } else if (!$this->countModules("top_2") && $this->countModules("top_3") && $this->countModules("top_4") && $this->countModules("top_5")) { $top_row="33.3%"; } else if ($this->countModules("top_2") && !$this->countModules("top_3") && $this->countModules("top_4") && $this->countModules("top_5")) { $top_row="33.3%"; } else if ($this->countModules("top_2") && $this->countModules("top_3") && !$this->countModules("top_4") && $this->countModules("top_5")) { $top_row="33.3%"; } else if ($this->countModules("top_2") && $this->countModules("top_3") && $this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="33.3%"; } else if (!$this->countModules("top_2") && !$this->countModules("top_3") && $this->countModules("top_4") && $this->countModules("top_5")) { $top_row="50%"; } else if (!$this->countModules("top_2") && $this->countModules("top_3") && !$this->countModules("top_4") && $this->countModules("top_5")) { $top_row="50%"; } else if (!$this->countModules("top_2") && $this->countModules("top_3") && $this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="50%"; } else if ($this->countModules("top_2") && !$this->countModules("top_3") && !$this->countModules("top_4") && $this->countModules("top_5")) { $top_row="50%"; } else if ($this->countModules("top_2") && !$this->countModules("top_3") && $this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="50%"; } else if ($this->countModules("top_2") && $this->countModules("top_3") && !$this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="50%"; } else if (!$this->countModules("top_2") && !$this->countModules("top_3") && !$this->countModules("top_4") && $this->countModules("top_5")) { $top_row="100%"; } else if (!$this->countModules("top_2") && $this->countModules("top_3") && !$this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="100%"; } else if (!$this->countModules("top_2") && !$this->countModules("top_3") && $this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="100%"; } else if ($this->countModules("top_2") && !$this->countModules("top_3") && !$this->countModules("top_4") && !$this->countModules("top_5")) { $top_row="100%"; } At the end of each row you'll need to adjust the top_row percentages. : Re: "top" module sizes : Matt-K February 22, 2010, 09:08:54 AM Thanks. I know about this part of the code but I don't know which one to change to give me the results I am looking to achieve. As I mentioned, 'top_2' would be a different size then 'top_3', 'top-4' and 'top_5'.
: Re: "top" module sizes : valaniabj February 24, 2010, 11:47:28 PM I am curious about this as well. I want the top_2 position to be 60% width and the top_3 position to be 40% width. Tried to update the code by adding:
else if ($this->countModules("top_2") && $this->countModules("top_3") && !$this->countModules("top_4") && !$this->countModules("top_5")) { $top_2="60%"; } else if ($this->countModules("top_2") && $this->countModules("top_3") && !$this->countModules("top_4") && !$this->countModules("top_5")) { $top_3="40%"; } and I get the top_2 on one position and the top_3 directly below it. they are both left justified. what is the best way to split the top_2 and top_3 positions? Please advise Thanks Brian : Re: "top" module sizes : mikek February 25, 2010, 09:48:02 AM Hello, actually the easier way may be to just hard code the %s in. Look for the following in the index.php file:
<?php if ($this->countModules("top_2")) { ?> <div id="s5_top_2" style="width:<?php echo $top_row ?>"> <jdoc:include type="modules" name="top_2" style="round_box" /> </div> <?php } ?> <?php if ($this->countModules("top_3")) { ?> <div id="s5_top_3" style="width:<?php echo $top_row ?>"> <jdoc:include type="modules" name="top_3" style="round_box" /> </div> <?php } ?> <?php if ($this->countModules("top_4")) { ?> <div id="s5_top_4" style="width:<?php echo $top_row ?>"> <jdoc:include type="modules" name="top_4" style="round_box" /> </div> <?php } ?> <?php if ($this->countModules("top_5")) { ?> <div id="s5_top_5" style="width:<?php echo $top_row ?>"> <jdoc:include type="modules" name="top_5" style="round_box" /> </div> <?php } ?> In each section you will see style="width:<?php echo $top_row ?>". This echos the width into each section. You can change that to: style="width:30%". You can use any number in there and use a different % for each div. |