Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • aulebowski Friend
    #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 Friend
    #552394

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

    aulebowski Friend
    #552470

    This 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 Friend
    #552548

    may I know on which page you made this change. since I tested it on your site and provided the code. It worked perfectly.

    aulebowski Friend
    #552569

    index.php?option=com_content&view=article&id=212&Itemid=627

    chavan Friend
    #552570

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

    aulebowski Friend
    #552577

    Perhaps 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 Friend
    #552579

    Now check your site, I have made some changes in the Masshead Module

    aulebowski Friend
    #552584

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

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

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