By default, If no image is selected in the Masthead module admin, it uses the 'article Intro image'.

I want it to load the Full Article Image instead, NOT the intro image.

I have made a change but it doesn't work

In modules/mod_jamasthead/helper.php

On line 210 I replaced image_intro to fulltext_image but it isnt working.

if(!isset($Masthead['params']['background']) || $Masthead['params']['background'] == ''){
                        $Masthead['params']['background'] = $images['image_intro'];  

I changed this to

if(!isset($Masthead['params']['background']) || $Masthead['params']['background'] == ''){
                        $Masthead['params']['background'] = $images['fulltext_image'];  

Is this the correct file to modify? I would be grateful for some advice please.

IDEALLY rather than making changes to the module itself, is there a way to make chages to the 'layout' files in templates/ja_healthcare/html/mod_jamasthead . I would prefer to do this, if possible. If not, any solution will do 😉

I looked at another way.

templates/ja_healthcare/html/mod_jamasthead
I duplicated the default file and renamed it default2.php

Around line 32 there are references to images, but not to the image_intro...... which I could have replaced.

Is there any way i could modify this file to show the article Full Text Image rather than the Intro Image?
If I could modify this, then all I would need to do is select a new 'Layout' (default2) in the admin panel of the Masthead module, without messing with the core helper file?

    maz001
    Hi,

    I'm afraid that in this case, you will need to customize in helper file of module like you mentioned above

    but you need to change this instead:

    if(!isset($Masthead['params']['background']) || $Masthead['params']['background'] == ''){
        $Masthead['params']['background'] = $images['image_fulltext'];
    }

    use 'image_fulltext' instead of 'fulltext_image'

    Ninja locked the discussion.
    Write a Reply...
    You need to Login to view replies.