Viewing 11 posts - 31 through 41 (of 41 total)
  • Author
    Posts
  • sailinsteve Friend
    #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.

    flavisic Friend
    #329874
    Solution
    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.php

    Find 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.php

    Find 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.php

    Find 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.php

    Find 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 Friend
    #329902

    You may want to check this documentation section.

    Regards,
    Danny

    jaybrd1 Friend
    #329904

    sailinsteve

    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 %

    kross76 Friend
    #332598

    I’m trying to do basically the same thing. I posted a new thread about my question today.

    minikolas Friend
    #341059

    I 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.php

    change –> <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.php

    change –> <div id=”ja-right” class=”column sidebar” style=”width:<?php echo $r ?>%”>

    to –> <div id=”ja-right” class=”column sidebar” style=”width:30%”>

    musicinme Friend
    #341840

    If 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]

    itaym Friend
    #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 Friend
    #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.

    timba Friend
    #354694

    year 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; ?>

    barneytruit Friend
    #385837

    investx, timba thanks, but what if I want to set a minimum width for the main?

Viewing 11 posts - 31 through 41 (of 41 total)

This topic contains 41 replies, has 18 voices, and was last updated by  barneytruit 13 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum