Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • cherryred Friend
    #168711

    Please would anyone be willing to give instructions on how to control the percentage width of user position 1-5. I found the top spotlight block but I have no expertise to understand the code or how to change it.

    I am displaying images in users 1-3 and have a news slider published in user 4 (nothing in user 5)

    I want users 1-3 to each take up about 20% width, so 40% width for user4 with user 5 automatically collapsed.

    Thank you

    himangi Friend
    #413797

    Hi,

    You can use the following information to specify a specialwidth to either extreme left or extreme right columns in the spotlight positions..

    <blockquote>Custom width

    Expression: <block name=”top-spotlight” type=”spotlight” special=”left” specialwidth=”25″>user1,user2,user3,user4,user5</block>
    Purpose: – this will override the default 20% width for a single position within the layout, it could be the one in the right side, it could be the one in the left side, but let’s examine these parameters closer:

    * special=”left” – this defines where is the module we want to use the custom width: left or right
    * specialwidth=”25″ – this defines the new width value for this module within the spotlight block. </blockquote>

    Let me know if you need help further.

    cherryred Friend
    #415041

    Hi Himangi,

    thank you, by being canny about which user positions I use on which pages, your bit of code will do just what I want.

    Yes please, I do need further help – into which file do I need to paste the code, and is tit critical at which point in the file?

    I had a look at various files within the template folder, in the css and layouts and blocks folders, but being a beginner it wasn’t obvious to me, sorry for putting you to extra trouble

    thanks for your assistance

    himangi Friend
    #415202

    Hi

    You need to make these changes in the layout you are using.. Considering you havent changed anything regarding the layout after installing the template, by default the layout being used is DEFAULT layout. So follow the steps below and you will see where to make changes..

    1. Go to Extensions > Template Manager > Your JAT3 template > Layouts Tab.
    2. Click on EDIT link infront of the Default layout.
    3. Find code similar to the code below
    4. <blockquote><blocks name=”middle” colwidth=”25″ >
      ……
      <block name=”top-spotlight” type=”spotlight” >user1,user2,user3,user4,user5</block>
      ….
      </blocks></blockquote>
      replace it with the new code
      <blockquote><blocks name=”middle” colwidth=”25″ >
      ……
      <block name=”top-spotlight” type=”spotlight” special=”left” specialwidth=”25″>user1,user2,user3,user4,user5</block>
      ….
      </blocks></blockquote>
      In above case, the special=”left”, will specify a special width to position user1, special=”right” will specify a special width to position user5. The special width for user1 / user5, depending on left / right used for Special param, will take 25% of total width.

    5. Save the changes.

    Hope this is clear to you and achieves what you want.. 🙂

    cherryred Friend
    #415245

    Hi,

    if only I could just see where to put the code – I can see how to alter the code to affect either user1 or 5, and how to specify the percentage.

    This is a screenshot of the backend, template manager, ja purity ii. I am developing on J1.5 because of a component I want to use (perhaps the admin options are different in 1.6 or 1.7? If so my apologies for not giving full info before)

    Further up there is the option to edit html (which opens templatefolder/index.php) or edit css (which opens templatefolder/css/template.css) but have looked at these – not the right place, no code about blocks.

    I am not using the default layout but left-main-right rounded.

    The nearest thing that looks likely (to my amateur eye) is that the block topsl is called, and within the file /blocks/topsl.php there is a bit that goes
    <?php if( $this->countModules(‘user5’) ): ?>
    <div class=”ja-box column ja-box<?php echo $botsl[‘user5’][‘class’]; ?>” style=”width: <?php echo $botsl[‘user5’][‘width’]; ?>;”>
    <jdoc:include type=”modules” name=”user5″ style=”JAxhtml” />
    </div>
    <?php endif; ?>

    If only I could see an EDIT link in front of the layout as you mention, then I’d know which file to edit. So near and yet so far

    I’m sorry – what prob seemed like a quick reply to you now taking up more of your time.


    1. layout-snip
    cherryred Friend
    #415251

    So I’ve been researching a bit more

    when I installed purity ii template, I just installed the template

    when I had problems configuring the mega menu, I eventually found the plugin for ja mnu extended parameters

    I now realise there is a whole plugin for the JAT3 framework (I naively imagined that the purity ii template, being called a JAT3 template, came with something called JAT3 installed with the template)

    So now I am backing up the site, then will install the JAT3 for joomla 1.5 plugn and cross my fingers. Am I right in thinking that I will then have a layout tab in the template backend so then I can follow your helpful tip?

    will post if I have sucess

    cherryred Friend
    #415257

    Have installed the Jat3 system plugin, and enabled it

    The template manager still looks the same, no tabs have appeared.

    The only new thing is up on the top right a link saying JAT3 clean cache

    Has this question now become something quite different – should I start a new thread?

    himangi Friend
    #415428

    Hi

    I am extremely sorry, the JA Purity ii template doesnt have the tabs I was talking about. Please give me some time and I will get back to you on this again.

    Sorry! :-[

    cherryred Friend
    #415502

    That’s no problem, I was just starting to wonder if it was you not me!

    I really appreciate getting your help, and will wait. Greetings to Pune, I passed nearby there once, years ago

    chavan Friend
    #415645

    Hi cherryred

    You open file templates/ja_purity_ii/layouts/blocks/topsl.php. And replace line 4:


    $botsl = $this->calSpotlight ($spotlight,100);

    by


    $botsl = $this->calSpotlight ($spotlight,100, 40, 'right');

    Save this file and refresh your page.

    cherryred Friend
    #415698

    Hi Do Ha

    Thank you so much, that works just great. I adjusted the ’40’ to get the width of user5 exactly where I wanted it.

    <em>@Do Ha 271398 wrote:</em><blockquote>
    $botsl = $this->calSpotlight ($spotlight,100, 40, ‘right’);
    </blockquote>

    Just so I learn, can I clarify what the above line of code does – it says the spotlight area takes up 100% of the page width, and of that user5 on the right takes up 40% of the page width – am I right?

    I think it must, because I checked by replacing ‘right’ with ‘left’ which enables me to control the percentage with of user1.

    One last quick question, please. What code would be needed to control both ‘left’ and ‘right’ ?

    If I can work out where to do it I shall thank you for your post! 😀
    Cherry

    chavan Friend
    #415852

    Hi cherryred

    You want control both left and right. You should customize the calSpotlight function in template/ja_purity_ii/libs/ja.template.healper.php

    In purity ii template, we just support only once special (right/left).

    fdserste Friend
    #424751

    thanks guys for this discussion! I had some headaches concerning percentage control in ja t3 blank but now it is solved.
    have a nice time!

Viewing 13 posts - 1 through 13 (of 13 total)

This topic contains 13 replies, has 4 voices, and was last updated by  fdserste 12 years, 5 months ago.

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