-
AuthorPosts
-
September 19, 2011 at 10:44 am #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 Friendhimangi
- Join date:
- April 2011
- Posts:
- 1406
- Downloads:
- 1
- Uploads:
- 86
- Thanks:
- 21
- Thanked:
- 345 times in 332 posts
September 20, 2011 at 5:18 am #413797Hi,
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.
September 26, 2011 at 1:46 pm #415041Hi 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 Friendhimangi
- Join date:
- April 2011
- Posts:
- 1406
- Downloads:
- 1
- Uploads:
- 86
- Thanks:
- 21
- Thanked:
- 345 times in 332 posts
September 27, 2011 at 5:21 am #415202Hi
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..
- Go to Extensions > Template Manager > Your JAT3 template > Layouts Tab.
- Click on EDIT link infront of the Default layout.
- Find code similar to the code below
- Save the changes.
<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.Hope this is clear to you and achieves what you want.. 🙂
1 user says Thank You to himangi for this useful post
September 27, 2011 at 11:49 am #415245Hi,
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.
September 27, 2011 at 12:41 pm #415251So 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
September 27, 2011 at 1:03 pm #415257Have 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 Friendhimangi
- Join date:
- April 2011
- Posts:
- 1406
- Downloads:
- 1
- Uploads:
- 86
- Thanks:
- 21
- Thanked:
- 345 times in 332 posts
September 28, 2011 at 4:35 am #415428Hi
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! :-[
September 28, 2011 at 5:09 pm #415502That’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 Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
September 29, 2011 at 10:35 am #415645Hi 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.
September 29, 2011 at 5:57 pm #415698Hi 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! 😀
Cherrychavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
September 30, 2011 at 8:42 am #415852Hi 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).
November 15, 2011 at 2:48 pm #424751thanks guys for this discussion! I had some headaches concerning percentage control in ja t3 blank but now it is solved.
have a nice time!AuthorPostsViewing 13 posts - 1 through 13 (of 13 total)This topic contains 13 replies, has 4 voices, and was last updated by fdserste 13 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Control percentage width of user 1-5
Viewing 13 posts - 1 through 13 (of 13 total)