Classic Theme - Mobile Logo

Classic Theme - Mobile Logo

by Ahmad Moussa -
Number of replies: 6

Dear Moodlers, 

Kindly need your help to show Moodle Logo or Title "LMS Portal" to the mobile template? Please can anyone help me that. Please find the attached picture.

Mobile Template Logo or Title

Average of ratings: -
In reply to Ahmad Moussa

Re: Classic Theme - Mobile Logo

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Moving to Themes forum...
In reply to Howard Miller

Re: Classic Theme - Mobile Logo

by Ahmad Moussa -

Hello, please can anyone help me? Thanks in advance.

In reply to Ahmad Moussa

Re: Classic Theme - Mobile Logo

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
What version of Moodle please?
In reply to Gareth J Barnard

Re: Classic Theme - Mobile Logo

by Ahmad Moussa -

Thanks for your reply.

Please be noted that my Moodle Version is: Moodle 3.7.4+ (Build: 20200117)

Is it possible to show the Compact Logo in the Mobile Template Version instead of the Short Name?

Thanks in advance.

Attachment Logo.png
In reply to Ahmad Moussa

Re: Classic Theme - Mobile Logo

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok....

In the navbar template remove 'd-none d-sm-inline' from:

            {{# output.should_display_navbar_logo }}
                <span class="logo d-none d-sm-inline">
                    <img src="{{output.get_compact_logo_url}}" alt="{{sitename}}">
                </span>
            {{/ output.should_display_navbar_logo }}

in the overridden core_renderer.php, override the method 'should_display_navbar_logo' not to use '!$this->should_display_main_logo()' in the boolean logic of the method:

    public function should_display_navbar_logo() {
        $logo = $this->get_compact_logo_url();
        return !empty($logo) && !$this->should_display_main_logo();
    }

Then purge all caches.


In reply to Gareth J Barnard

Re: Classic Theme - Mobile Logo

by Ahmad Moussa -
Really Thank you Gareth J Barnard. I really appreciate your great cooperation and support. It worked perfectly.