-
AuthorPosts
-
ghbridge Friend
ghbridge
- Join date:
- July 2013
- Posts:
- 12
- Downloads:
- 9
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 3 times in 1 posts
August 17, 2013 at 11:26 pm #189821I would like to replace the background colour on the Masshead with an image or even just make the background white. I have looked at the documentation for masshead and it tells me to put
[Masshead Itemid=”435,481,482,483,484,546,547,548,549″ title=”Hi.” background=”/images/joomlart/demo/photo/box_1_th.jpg”]
into the configuration conditions, which I have done, but it appears to have no effect.
For a start, there appears to be no reference to the background colour in these conditions, so therefore where is it determined? In the case of this template, the colour derives frome the colour scheme for the template itself but when I look in template.css the masshead section again makes no reference to the background.
What can I do to change it?
Alternatively, if I switch off Masshead, can someone tell me how to create a custom module of the same size as Mass head and ensure that it appears in that position on the Home page.
Thanks in advance 🙂
Ps – just seen the title and I can spell coloured but can’t change it – sorry! (Or even colored for all you northern Americans out there..)
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
August 20, 2013 at 2:11 am #502758Hi ghbridge,
As the document here:
http://www.joomlart.com/forums/topic/userguide-ja-masshead-module-for-joomla-1-7/
You should modify the markup of JA Masshead module to something like this.<?php
/**
* $JA#COPYRIGHT$
*/defined('_JEXEC') or die('Restricted access');
?>
<div class="jamasshead<?php echo $params->get('moduleclass_sfx','')?>" <?php if(isset($masshead['params']['background'])): ?> style="background-image: url(<?php echo $masshead['params']['background'] ?>)" <?php endif; ?>>
<h3 class="jamasshead-title"><?php echo $masshead['title']; ?></h3>
<div class="jamasshead-description"><?php echo $masshead['description']; ?></div>
</div>1. Create a folder /html/mod_jamasshead
2. Create default.php file in that folder with content aboveIn case that you want to turn off JA Masshead and use another module.
Please take a look at the userguide here:
http://joomlart.com/documentation/joomla/ja-templates/904-ja-fixel-template1. Make sure you select a Additional position in template settings (home-1 should be default)
2. Publish your module to that position
3. Use class suffix to control the size and order (grid-2×2 grid-pos-1, please check JA Slideshow module (Shop menu) for example)Hope it helps,
Regards
1 user says Thank You to Wall Crasher for this useful post
ghbridge Friendghbridge
- Join date:
- July 2013
- Posts:
- 12
- Downloads:
- 9
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 3 times in 1 posts
August 20, 2013 at 9:28 am #502838Thanks for the reply – very useful. The background image in masshead makes perfect sense and I will try it to see that I can! In the meantime, what I actually did was to put JA Slideshow module in the home-1 position. However, I seem to be restricted in the width of the module to 2×1 or 3×2, defined by the class suffix. I have tried editing the template.css to allow a size of 4×2 but even with the css edited, if you try putting grid-4×2 it just defaults to 1×1. Is there somewhere else in the css that constrains the allowable module sizes?
Thanks again.
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
August 20, 2013 at 9:58 am #502850Hi ghbridge,
After you define the grid size in css, you need to change on javascript also.
You should see the function below around line 290 in templatesja_fixeljsscript.js. Just add your new size there.updateItems = function(items){
if(itemWidth == 0){
return false;
}if(!items){
items = $(masonry.masonry('getItemElements'));
}items.width(itemWidth).height(itemWidth);
items.filter('.grid-2x1').width(itemWidth * 2);
items.filter('.grid-1x2').height(itemWidth * 2);
items.filter('.grid-2x2').width(itemWidth * 2).height(itemWidth * 2);
items.filter('.grid-3x2').width(itemWidth * 3).height(itemWidth * 2);
},Regards
1 user says Thank You to Wall Crasher for this useful post
ghbridge Friendghbridge
- Join date:
- July 2013
- Posts:
- 12
- Downloads:
- 9
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 3 times in 1 posts
August 20, 2013 at 9:18 pm #502918Awesome – thank you so much – works perfectly.
October 7, 2013 at 10:38 pm #508299Hi, I think I’m trying to do something similar to the original question.. I don’t have much coding skills but I’m trying to get an image to be in place of the masshead except 2×3. I disabled the masshead module and created a custom HTML module with the image I want but when I did that, the image was resized to fill the 2×2 spot and there’s white space on the bottom of the box. I’ve attached a screenshot. Or you can visit the page for yourself here. Any pointers to get me going in the right direction, please?
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
October 8, 2013 at 2:09 am #508307Hi aaronnak,
For module sizing, you should use Module class suffix. Here the document.
http://www.joomlart.com/documentation/joomla-templates/ja-fixel#extensions-configBy default, we have grid-1×1, grid-1×2, grid-2×1, grid-2×2 and grid-3×2. As in my first answer, you can define a new grid type via javascript and css.
For your problem, you can define a new grid type, or just crop your image to a rectangle size. It is more easier.
Regards
AuthorPostsViewing 7 posts - 1 through 7 (of 7 total)This topic contains 7 replies, has 3 voices, and was last updated by Wall Crasher 11 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Replacing Masshead’s colured background with an image
Viewing 7 posts - 1 through 7 (of 7 total)