-
AuthorPosts
-
October 9, 2014 at 8:59 am #201940
I have put the following in my masshead module config but the background image appears on the div below where the background is set by the template so it doesnt look right (it only fills in the area behind the title, not the whole masthead)
[Masshead Itemid="621" title="About" background="/templates/xxx/images/masthead-bg2.jpg"][/Masshead]
<div class=”ja-masthead “>
<div class=”jamasshead jmoddiv” style=”background-image: url(/templates/xxx/images/masthead-bg2.jpg)” data-jmodtip=”<strong>Edit module</strong><br />JA Masthead<br />Position: masthead” data-jmodediturl=”http://www.xxx.com/administrator/index.php?option=com_modules&view=module&layout=edit&id=118″>
<h3 class=”jamasshead-title”>About</h3>
<div class=”jamasshead-description”></div>
</div>
</div>Here the templates background is set on class .ja-masthead but when trying to set the background in the module, the background is set on .jamasshead
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 9, 2014 at 1:25 pm #552394try this code in the Module
Since it is blog Layout you have another syntax to achieve
[Masshead option="com_content" view="category" layout="blog" id="88" class="sudomast" title="About SUDOSCAN+" background="/templates/diabeteshealthcareaustralia/images/masthead-bg2.jpg"][/Masshead]
October 10, 2014 at 3:46 am #552470This didn’t seem to work? Is 88 the id of the category? I also tried 98 the category id but it also didnt work?
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 10, 2014 at 4:43 pm #552548may I know on which page you made this change. since I tested it on your site and provided the code. It worked perfectly.
October 10, 2014 at 11:59 pm #552569index.php?option=com_content&view=article&id=212&Itemid=627
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 11, 2014 at 2:08 am #552570For this you can add, i have already added this code to your site.
[Masshead Itemid="627" title="About EZSCAN" background="/templates/diabeteshealthcareaustralia/images/masthead-bg2.jpg"][/Masshead]October 11, 2014 at 5:35 am #552577Perhaps I should have been clearer in my original post, I have no problem setting the background for the masthead, my problem is that the background is being set on a different class than the template sets the background (.jamasshead instead of .ja-masthead) the result of this is that the background doesn’t display properly on the masthead it only takes up a fraction of the masthead background and the default masthead background is still visible behind it.
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 11, 2014 at 6:14 am #552579Now check your site, I have made some changes in the Masshead Module
1 user says Thank You to chavan for this useful post
October 11, 2014 at 8:37 am #552584Thanks for that, I didn’t think of setting the style directly in the page.
If anyone else has the same problem, Chavans solution was to edit the default.php in the templatename/html/mod_jamasshead with the following:
<?php if(isset($masshead['params']['background'])): ?>
<style>
.ja-masthead {
background: url(<?php echo $masshead['params']['background'] ?>) no-repeat left top !important;
padding: 40px 0 !important;
}</style>
<?php endif; ?>
-
AuthorPosts
This topic contains 9 replies, has 2 voices, and was last updated by aulebowski 10 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum