-
AuthorPosts
-
December 22, 2009 at 5:29 am #327153
OK, I’m pretty new to Joomla and the Purity II tempalate as well & I would like control of this stuff too.
First off, I don’t have an answer, but maybe I can contrbuite a bit.
From what I see, depending on what template width you choose you will set the width in right.php
<div id=”ja-right” class=”column sidebar” style=”width:<?php echo $r ?>%”>
the actual code lives in ja.template.helper.php in the lib directory
But what I’d like to find out is … has anyone got the automation to work in the layout page
in my case (left-main-right.square.php. It goes like this
//$this->customwidth(‘right1’, 25); <== override right1 column width to 25%.
but when I try to call a custom width I get an error.January 20, 2010 at 7:56 pm #329874Solution
More easily and super fast to make changes in the columns!Imagine how we use “default”. By default the any dimension are:
Left + Main = 80%
Right = 20%If we increase the column “right”, we must reduce the column “left + main”, otherwise the sum of two percentages would be greater than 100%.
1 step
Edit the file:
ja_purity_ii / layouts / default.phpFind it:
[PHP] <div id=”ja-mainbody” style=”width: 80%”>[/PHP]Replace with:[PHP] <div id=”ja-mainbody” style=”width: 78%”>[/PHP]
/ !
I put 78, but may put another number, you must keep in mind, we will see in the following steps, this value + the column to give the “right” must be equal to 100.2 step
Edit the file:
ja_purity_ii / layouts / blocks / right.phpFind it:
[PHP]<div id=”ja-right” class=”column sidebar” style=”width:<?php echo $r ?>%”>[/PHP]Replace with:[PHP]<div id=”ja-right” class=”column sidebar” style=”width: 22%”>[/PHP]
/ !
As previously defene 78, here necessarily had to put 22. For example, if you wanted to put the right column with 25% in the previous step would have to change 80% to 75%.To change the left column
1 step
Edit the file:
ja_purity_ii / layouts / blocks / left.phpFind it:
[PHP]<div id=”ja-left” class=”column sidebar” style=”width:<?php echo $l ?>%”>[/PHP]Replace with:[PHP]<div id=”ja-left” class=”column sidebar” style=”width:25%”>
[/PHP]Put as an example: 25%.2 step
Edit the file:
ja_purity_ii / layouts / blocks / main.phpFind it:
[PHP]<div id=”ja-main” style=”width:<?php echo $this->getColumnWidth(‘m’) ?>%”>
[/PHP]Replace with:[PHP]<div id=”ja-main” style=”width:75%”>[/PHP]As previously put 25%, this time I have to put 75%.But if the “left” column is with 25%, the “main” column with 75%, the right column does not appear?
Appears. The “left” and the “main”, form a column, the column “right”, so another column. That is why “left” + “main” must be equal to 100, and ( “left” + “main”) + “right” must also be equal to 100.I apologize if it is not very understandable! Because I am Portuguese and I am using an online translator!
korb Friendkorb
- Join date:
- March 2008
- Posts:
- 315
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 40
- Thanked:
- 48 times in 39 posts
January 21, 2010 at 12:43 am #329902You may want to check this documentation section.
Regards,
Danny1 user says Thank You to korb for this useful post
jaybrd1 Friendjaybrd1
- Join date:
- November 2009
- Posts:
- 28
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 7 times in 5 posts
January 21, 2010 at 2:20 am #329904sailinsteve
I feel after screwing up so many purity 2 templates I have become pretty knowledgable. I also enjoyed this same issue, but it was quite a silly fix.
Change <blockquote>//$this->customwidth(‘right1’, 25); <== override right1 column width to 25%.</blockquote>
to:<blockquote>$this->customwidth(‘right1’, 25); //<== override right1 column width to 25%.</blockquote>Thats it! Just move the //
flavisic
What are you rambling about? We already knew that all 2 or 3 columns had to = 100%!
We even knew how to do it.
Maybe you could provide an easy solution to the original question in this thread?
How to make it understand px instead of %February 13, 2010 at 5:50 pm #332598I’m trying to do basically the same thing. I posted a new thread about my question today.
April 21, 2010 at 8:52 am #341059I choose to use left-main-right-square layout and because i wanted a larger right column i did this:
First step:
@layouts/left-right-main.square.phpchange –> <div id=”ja-mainbody” style=”width:<?php echo $this->getColumnWidth(‘mw’) ?>%”>
to –> <div id=”ja-mainbody” style=”width:70%”>
Second step:
@layouts/block/right-xhtml.phpchange –> <div id=”ja-right” class=”column sidebar” style=”width:<?php echo $r ?>%”>
to –> <div id=”ja-right” class=”column sidebar” style=”width:30%”>
musicinme Friendmusicinme
- Join date:
- September 2009
- Posts:
- 70
- Downloads:
- 3
- Uploads:
- 9
- Thanks:
- 6
- Thanked:
- 50 times in 23 posts
April 27, 2010 at 9:07 pm #341840If you want to change width directly from admin site
1. open templateDetails.xml and after
[PHP]
<param name=”ja_screen-fluid-fix-ja_screen_width” type=”text” default=”” label=”Specified width” description=”SPECIFIED WIDTH DESCRIPTION” />
[/PHP]add this
[PHP]
<param name=”left1_column” type=”text” default=”10″ label=”Left 1 column width” description=”” />
<param name=”left2_column” type=”text” default=”10″ label=”Left 2 column width” description=”” />
<param name=”right1_column” type=”text” default=”20″ label=”Right 1 column width” description=”” />
<param name=”right2_column” type=”text” default=”20″ label=”Right 2 column width” description=”” />
<param name=”inset1_column” type=”text” default=”20″ label=”Inset 1 column width” description=”” />
<param name=”inset2_column” type=”text” default=”20″ label=”Inset 2 column width” description=”” />
[/PHP]2. Open ja_purity_ii/layouts/your-layouts ex. default and after:
[PHP]
$positions = array (
‘left1′ =>’left’,
‘left2’ =>”,
‘left-mass-top’ =>”,
‘left-mass-bottom’ =>”,
‘right1′ =>’right’,
‘right2’ =>”,
‘right-mass-top’ =>”,
‘right-mass-bottom’ =>”,
‘content-mass-top’ =>”,
‘content-mass-bottom’ =>”,
‘content-top’ =>”,
‘content-bottom’ =>”,
‘inset1’ =>”,
‘inset2’ =>”
);
[/PHP]add this
[PHP]
$this->customwidth(‘right1’, $this->_tpl->params->get(“right1_column”));
$this->customwidth(‘right2’, $this->_tpl->params->get(“right2_column”));
$this->customwidth(‘left1’, $this->_tpl->params->get(“left1_column”));
$this->customwidth(‘left2’, $this->_tpl->params->get(“left2_column”));
$this->customwidth(‘inset1’, $this->_tpl->params->get(“inset1_column”));
$this->customwidth(‘inset2’, $this->_tpl->params->get(“inset2_column”));[/PHP]May 17, 2010 at 11:54 am #343820@ musicinme
I did what you describe and in FF and Opera it’s look different from IE8. ////// I found why … the options Narow screen, wid screen and full screen.
I use SPECIFIED PIXEL and its look like it’s not working.
What is this line?
<param name="header1" type="text" default="50" label="Header1 position width" description="" />
becaus in my template edit i see Header1 position width field.
In general, someone can explain what is the “inset” function?
musicinme Friendmusicinme
- Join date:
- September 2009
- Posts:
- 70
- Downloads:
- 3
- Uploads:
- 9
- Thanks:
- 6
- Thanked:
- 50 times in 23 posts
July 19, 2010 at 12:44 pm #350251<em>@itaym 178845 wrote:</em><blockquote>@ musicinme
I did what you describe and in FF and Opera it’s look different from IE8. ////// I found why … the options Narow screen, wid screen and full screen.
I use SPECIFIED PIXEL and its look like it’s not working.
What is this line?
<param name="header1" type="text" default="50" label="Header1 position width" description="" />
becaus in my template edit i see Header1 position width field.
In general, someone can explain what is the “inset” function?</blockquote>
It was my modification where I did place another position. So don;t bother bout that.
September 6, 2010 at 6:08 am #354694year later … :-[
investx, thank you for your solution.I have the following problems:
1. If the length of the content in a “main” is small, it does not appear at all the available width of the field.
2. If the height of the content in the “main” less than “left”, then the lower modules fit over the “left”.The decision has not yet found. : (
Upd:
Poor solution for 1:
in main-rounded.php (or main.php) replace code<?php $contents = $this->getBuffer('component');
if (!preg_match ('/<div class="blog">s*</div>/',$contents)) :?>
<div class="ja-content-main clearfix">
<jdoc:include type="component" />
</div>
<?php endif; ?>to code
<?php $contents = $this->getBuffer('component');
if (!preg_match ('/<div class="blog">s*</div>/',$contents)) :?>
<div class="ja-content-main clearfix">
<jdoc:include type="component" />
<div style="color:#fff;text-color:#fff;owerflow:hidden;">
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
</div>
</div>
<?php endif; ?>April 11, 2011 at 8:41 pm #385837investx, timba thanks, but what if I want to set a minimum width for the main?
-
AuthorPosts
This topic contains 41 replies, has 18 voices, and was last updated by barneytruit 13 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum