How to add a banner into standard theme moodle 2.0?

How to add a banner into standard theme moodle 2.0?

by Heinser Diaz -
Number of replies: 4

Hello, maybe this topic has been discussed a lot in the forums. Believe me , i've been reading a lot of suggestions form different users on how to add a banner, but im still struggling with it. I know now that there are some themes where you can just type in the url of an image to change the logo. but i want to use the standard theme.

Also i recently upgraded my moodle site from 1.94. to 2.0. i was able to add a banner before by modifying the header.html file in the theme folder.

<h1 class="headermain">
<img src= "<?php echo $CFG->themewww .'/'. current_theme() ?>/pix/logo.jpg" alt="<?php echo $heading?>"/></h1>

i cant seem to find that file.

Thanks in advance.

Have a great day smile

Average of ratings: -
In reply to Heinser Diaz

Re: How to add a banner into standard theme moodle 2.0?

by Ann Adamcik -

The standard theme uses the base layout files, so you'll need to edit theme/base/layout/frontpage.php and/or theme/base/layout/general.php. If you're changing more than just the header logo, it might be best to copy the needed files into a new theme directory and make your edits there.

In reply to Ann Adamcik

Re: How to add a banner into standard theme moodle 2.0?

by Heinser Diaz -

hello ann,

one problem that i noticed is that my standard theme folder contains only the following:

- lang folder

-pix folder

-style folder

and config.php file

but there is no base or layout. however, most of the other themes DO contain a layout folder with frontpage.php and general.php files in it. can i just copy one layout folder from another theme and paste it inside the standard theme?

In reply to Heinser Diaz

Re: How to add a banner into standard theme moodle 2.0?

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Heinser,

You will need to copy the layout folder from the base theme into the standard theme (a copy of standard preferably!) and then copy the theme layouts section of the config.php from base into the config.php in standard.

Without rewriting it all, if you check out this discussion you will find much more detail and Mary's version of standard with a logo, and another one requested by Troy which gives a different logo on the front page and other pages.

Hope that helps

In reply to Richard Oelmann

Re: How to add a banner into standard theme moodle 2.0?

by Heinser Diaz -

Thanks a lot Richard. I didnt see the base theme before, but now with those files i can modify the layout of my theme ;)